From 56860dc6cb7c65bebc13e0a2961aa11f04262d8e Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 4 Dec 2024 23:01:23 +0000 Subject: [PATCH 1/2] feat: A new enum `DeploymentType` is added feat: A new field `deployment_type` is added to message `.google.cloud.parallelstore.v1beta.Instance` PiperOrigin-RevId: 702831788 Source-Link: https://github.com/googleapis/googleapis/commit/9ea2c56cb70d70f10fd2bef310ac9febe8d42d30 Source-Link: https://github.com/googleapis/googleapis-gen/commit/75e81055a97f04ef53e5b3f4703981f3de8852a2 Copy-Tag: eyJwIjoiUGFyYWxsZWxzdG9yZS8uT3dsQm90LnlhbWwiLCJoIjoiNzVlODEwNTVhOTdmMDRlZjUzZTViM2Y0NzAzOTgxZjNkZTg4NTJhMiJ9 --- .../Cloud/Parallelstore/V1/Parallelstore.php | Bin 0 -> 8431 bytes .../V1/CreateInstanceRequest.php | 273 ++++ .../V1/DeleteInstanceRequest.php | 155 +++ .../Parallelstore/V1/DestinationGcsBucket.php | 75 ++ .../V1/DestinationParallelstore.php | 71 ++ .../Parallelstore/V1/DirectoryStripeLevel.php | 68 + .../Parallelstore/V1/ExportDataMetadata.php | 351 ++++++ .../Parallelstore/V1/ExportDataRequest.php | 287 +++++ .../Parallelstore/V1/ExportDataResponse.php | 33 + .../Parallelstore/V1/FileStripeLevel.php | 68 + .../Parallelstore/V1/GetInstanceRequest.php | 86 ++ .../Parallelstore/V1/ImportDataMetadata.php | 351 ++++++ .../Parallelstore/V1/ImportDataRequest.php | 287 +++++ .../Parallelstore/V1/ImportDataResponse.php | 33 + .../Cloud/Parallelstore/V1/Instance.php | 625 ++++++++++ .../Cloud/Parallelstore/V1/Instance/State.php | 85 ++ .../Parallelstore/V1/ListInstancesRequest.php | 237 ++++ .../V1/ListInstancesResponse.php | 136 ++ .../Parallelstore/V1/OperationMetadata.php | 307 +++++ .../Parallelstore/V1/SourceGcsBucket.php | 75 ++ .../Parallelstore/V1/SourceParallelstore.php | 71 ++ .../Parallelstore/V1/TransferCounters.php | 261 ++++ .../V1/TransferOperationMetadata.php | 261 ++++ .../Cloud/Parallelstore/V1/TransferType.php | 61 + .../V1/UpdateInstanceRequest.php | 225 ++++ .../ParallelstoreClient/create_instance.php | 104 ++ .../ParallelstoreClient/delete_instance.php | 80 ++ .../V1/ParallelstoreClient/export_data.php | 83 ++ .../V1/ParallelstoreClient/get_instance.php | 72 ++ .../V1/ParallelstoreClient/get_location.php | 57 + .../V1/ParallelstoreClient/import_data.php | 83 ++ .../V1/ParallelstoreClient/list_instances.php | 80 ++ .../V1/ParallelstoreClient/list_locations.php | 62 + .../ParallelstoreClient/update_instance.php | 89 ++ .../v1/src/V1/Client/ParallelstoreClient.php | 607 +++++++++ .../v1/src/V1/gapic_metadata.json | 63 + .../parallelstore_client_config.json | 67 + .../parallelstore_descriptor_config.php | 197 +++ .../parallelstore_rest_client_config.php | 188 +++ .../V1/Client/ParallelstoreClientTest.php | 1100 +++++++++++++++++ .../Parallelstore/V1Beta/Parallelstore.php | Bin 0 -> 8766 bytes .../V1beta/CreateInstanceRequest.php | 273 ++++ .../V1beta/DeleteInstanceRequest.php | 155 +++ .../Parallelstore/V1beta/DeploymentType.php | 62 + .../V1beta/DestinationGcsBucket.php | 75 ++ .../V1beta/DestinationParallelstore.php | 71 ++ .../V1beta/DirectoryStripeLevel.php | 68 + .../V1beta/ExportDataMetadata.php | 351 ++++++ .../V1beta/ExportDataRequest.php | 287 +++++ .../V1beta/ExportDataResponse.php | 33 + .../Parallelstore/V1beta/FileStripeLevel.php | 68 + .../V1beta/GetInstanceRequest.php | 86 ++ .../V1beta/ImportDataMetadata.php | 351 ++++++ .../V1beta/ImportDataRequest.php | 287 +++++ .../V1beta/ImportDataResponse.php | 33 + .../Cloud/Parallelstore/V1beta/Instance.php | 667 ++++++++++ .../Parallelstore/V1beta/Instance/State.php | 85 ++ .../V1beta/ListInstancesRequest.php | 237 ++++ .../V1beta/ListInstancesResponse.php | 136 ++ .../V1beta/OperationMetadata.php | 307 +++++ .../Parallelstore/V1beta/SourceGcsBucket.php | 75 ++ .../V1beta/SourceParallelstore.php | 71 ++ .../Parallelstore/V1beta/TransferCounters.php | 261 ++++ .../V1beta/TransferOperationMetadata.php | 261 ++++ .../Parallelstore/V1beta/TransferType.php | 61 + .../V1beta/UpdateInstanceRequest.php | 225 ++++ .../ParallelstoreClient/create_instance.php | 104 ++ .../ParallelstoreClient/delete_instance.php | 80 ++ .../ParallelstoreClient/export_data.php | 83 ++ .../ParallelstoreClient/get_instance.php | 72 ++ .../ParallelstoreClient/get_location.php | 57 + .../ParallelstoreClient/import_data.php | 83 ++ .../ParallelstoreClient/list_instances.php | 80 ++ .../ParallelstoreClient/list_locations.php | 62 + .../ParallelstoreClient/update_instance.php | 89 ++ .../src/V1beta/Client/ParallelstoreClient.php | 647 ++++++++++ .../v1beta/src/V1beta/gapic_metadata.json | 63 + .../parallelstore_client_config.json | 67 + .../parallelstore_descriptor_config.php | 197 +++ .../parallelstore_rest_client_config.php | 187 +++ .../V1beta/Client/ParallelstoreClientTest.php | 1100 +++++++++++++++++ 81 files changed, 14971 insertions(+) create mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/GPBMetadata/Google/Cloud/Parallelstore/V1/Parallelstore.php create mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/CreateInstanceRequest.php create mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/DeleteInstanceRequest.php create mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/DestinationGcsBucket.php create mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/DestinationParallelstore.php create mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/DirectoryStripeLevel.php create mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ExportDataMetadata.php create mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ExportDataRequest.php create mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ExportDataResponse.php create mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/FileStripeLevel.php create mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/GetInstanceRequest.php create mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ImportDataMetadata.php create mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ImportDataRequest.php create mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ImportDataResponse.php create mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/Instance.php create mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/Instance/State.php create mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ListInstancesRequest.php create mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ListInstancesResponse.php create mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/OperationMetadata.php create mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/SourceGcsBucket.php create mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/SourceParallelstore.php create mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/TransferCounters.php create mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/TransferOperationMetadata.php create mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/TransferType.php create mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/UpdateInstanceRequest.php create mode 100644 owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/create_instance.php create mode 100644 owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/delete_instance.php create mode 100644 owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/export_data.php create mode 100644 owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/get_instance.php create mode 100644 owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/get_location.php create mode 100644 owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/import_data.php create mode 100644 owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/list_instances.php create mode 100644 owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/list_locations.php create mode 100644 owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/update_instance.php create mode 100644 owl-bot-staging/Parallelstore/v1/src/V1/Client/ParallelstoreClient.php create mode 100644 owl-bot-staging/Parallelstore/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/Parallelstore/v1/src/V1/resources/parallelstore_client_config.json create mode 100644 owl-bot-staging/Parallelstore/v1/src/V1/resources/parallelstore_descriptor_config.php create mode 100644 owl-bot-staging/Parallelstore/v1/src/V1/resources/parallelstore_rest_client_config.php create mode 100644 owl-bot-staging/Parallelstore/v1/tests/Unit/V1/Client/ParallelstoreClientTest.php create mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/GPBMetadata/Google/Cloud/Parallelstore/V1Beta/Parallelstore.php create mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/CreateInstanceRequest.php create mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/DeleteInstanceRequest.php create mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/DeploymentType.php create mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/DestinationGcsBucket.php create mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/DestinationParallelstore.php create mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/DirectoryStripeLevel.php create mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ExportDataMetadata.php create mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ExportDataRequest.php create mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ExportDataResponse.php create mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/FileStripeLevel.php create mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/GetInstanceRequest.php create mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ImportDataMetadata.php create mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ImportDataRequest.php create mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ImportDataResponse.php create mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/Instance.php create mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/Instance/State.php create mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ListInstancesRequest.php create mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ListInstancesResponse.php create mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/OperationMetadata.php create mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/SourceGcsBucket.php create mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/SourceParallelstore.php create mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/TransferCounters.php create mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/TransferOperationMetadata.php create mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/TransferType.php create mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/UpdateInstanceRequest.php create mode 100644 owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/create_instance.php create mode 100644 owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/delete_instance.php create mode 100644 owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/export_data.php create mode 100644 owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/get_instance.php create mode 100644 owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/get_location.php create mode 100644 owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/import_data.php create mode 100644 owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/list_instances.php create mode 100644 owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/list_locations.php create mode 100644 owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/update_instance.php create mode 100644 owl-bot-staging/Parallelstore/v1beta/src/V1beta/Client/ParallelstoreClient.php create mode 100644 owl-bot-staging/Parallelstore/v1beta/src/V1beta/gapic_metadata.json create mode 100644 owl-bot-staging/Parallelstore/v1beta/src/V1beta/resources/parallelstore_client_config.json create mode 100644 owl-bot-staging/Parallelstore/v1beta/src/V1beta/resources/parallelstore_descriptor_config.php create mode 100644 owl-bot-staging/Parallelstore/v1beta/src/V1beta/resources/parallelstore_rest_client_config.php create mode 100644 owl-bot-staging/Parallelstore/v1beta/tests/Unit/V1beta/Client/ParallelstoreClientTest.php diff --git a/owl-bot-staging/Parallelstore/v1/proto/src/GPBMetadata/Google/Cloud/Parallelstore/V1/Parallelstore.php b/owl-bot-staging/Parallelstore/v1/proto/src/GPBMetadata/Google/Cloud/Parallelstore/V1/Parallelstore.php new file mode 100644 index 0000000000000000000000000000000000000000..0da87d8cc8afb9f56b4d726ce21300ad34db8e43 GIT binary patch literal 8431 zcmeHM&2QVt6<><6R~diL+KJ+Jh;FiDYMf<-8*;<+KK_G;_HV_ zcUl&qOZSZ+9@R!848ILX+l4S-X!zVfpMQjw&z-M$j+10qif3Xeo;g~cy&Q1V9RpB+ zh7r&6*=v!7JsK-oEeMui!_`w83L7rA_g;G|%O5I)@D3s3M3>0c#LvS@*C05$Lwx0#fD_(*1#5>e(dzKureE`gsK6)SZC7>%sV3PwWa zOc*^ORm%aa4XB0&qk4dbO}z$~o*GtU_{<05Gu`8%E$0^7E z^t+5~i&Am3KS7roh70o9?s1&yBxBmoq3eRUlk@Bn8i_a=k0AMg9P=c=V`%6|H(P{9 zelBrGO6zEd#W0>hQ@a(lQqUf4@0JQ{#f@TNeex|lijr&Pf?6qVZ%#@Wp<#8cQhZ#P zOwg6}!d8K;$aG~xEp7qL1^CRxN2SfOx=x9PawlJ@pQ3NXF^Z>G=zNh+_#WiR55X*6 z_IdDhk~Qr*FA>@2;_)PF1ZfT%#pB81Me*pZB*kO;4-%T*GCaR1D9YqVEdX%5iiSZb zz{UU~mLTH4R;xGgfU;gf7ahF`F##u4 zAjme-vH-s7`+Ci!FbK(<{yxH+Bs83`+uazj3abt1;q;$Cu{DO1LMXxaP5lArE}X6z zjW)U`@O>191M|l@EJj_L0J9;NM-Amnp*?WZZ$O(z48J?IfpQQ4JFQ?W#JZJ(uo2-O zib_fy^M;brY8FU(h-TJ_Nqo{N=o`7S!!qrPn*K=wO@-Z^7$`c6B(2TetkO{=mr;^f z4PIBdRr=Od$TeSgq4#empiEl=sARRa17&;_jnl&4@-%4bJV@tu63TcUT?*U|#i&lZ z3e#jz1Z7uRNK%){w5b3b3rpnN!sK##9!>1BiEOj(yq6g&>a2amw)*p znMg`Fk0xkGV$_KSJ&)ajlEI-G`Wk3z=FxRSKkRI1b~%O03Gzua%*~k}V_m2)MVeZ_ z@JXlj%V;{Ve%w?%{8##ziaQ|YcyPiaXgVT3h`5#FME@=_;(#zt|Hq9#jc_#bd5KMb zk%+zy!K;FBIMM)I@H3JC+3)o6NCg^M4^D6TLgIk<7KKFay>mcfSistl7`7hWAd#XS zD+y)Yk&-^h=4Su zZncAk!MSUP;P`P*?4mR2>tPq?En)qv+JqSU*R4(B6B{VW>ITfwLAA>c2pDU$+yEKl zgg4QcA0Ub5A3KCKBI7IH8jx89NEoBu<>)gBO^S#S--h9E%&xJyOxpu_8VvMgIyBUd zec}Z#DRjwn#1MPE1H*AhgJ~>NCVaPeO<_pJm(aM_U$-3two@#U@iZFc+k>|>Ddfch z8Wqw}W$+xtcUj%u-6)i`%F|Nk_zGib@nLDFT;aoO;R$$f1>f$mkIOcXuJu@t2zUk)D&@*AM$uTTqriWZ&{%9n#r=*gV!MMz zbM|(h;O!s^YR3JSYB0Y4?C)RxI+4Xo^lsxhbW1SNuZG76i;?4l#mKP%{;h;YBEv0S z?juEHuMm9Tu{(Y5rOFN?W1`a2$sU46jyD!h@Rt%AkB`i_pUvXig}`${$H*ydChSPk zCoj~w=mBcDA}aDr^(wdTEh9Kg2_IlCX3Bk(KA#_Q;be~g32Me?>Aq^lw-2c1kNc}R z9qJdE;hBE+gxZZX{Q@a~e!KwW&F}KNXs55KyhB_1bSmyEa3$b1euCP1qu;CK>tAxT? zVt+3#<&#jxLUDM5Ma1#Ot)xi^-hd=GfP+T~C*oC1>n)IeL z`UD^QX2*;-~Ql6c!hb3-;hTx)ahZG SQSWk@&UW%k?-O)_(0>5sx$5iy literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/CreateInstanceRequest.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/CreateInstanceRequest.php new file mode 100644 index 000000000000..602bfbf612b0 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/CreateInstanceRequest.php @@ -0,0 +1,273 @@ +google.cloud.parallelstore.v1.CreateInstanceRequest + */ +class CreateInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The instance's project and location, in the format + * `projects/{project}/locations/{location}`. + * Locations map to Google Cloud 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 Parallelstore instance. + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project / location + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance_id = ''; + /** + * Required. The instance to create. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The instance's project and location, in the format + * `projects/{project}/locations/{location}`. + * Locations map to Google Cloud zones; for example, `us-west1-b`. Please see + * {@see ParallelstoreClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Parallelstore\V1\Instance $instance Required. The instance to create. + * @param string $instanceId Required. The name of the Parallelstore instance. + * + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project / location + * + * @return \Google\Cloud\Parallelstore\V1\CreateInstanceRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Parallelstore\V1\Instance $instance, string $instanceId): self + { + return (new self()) + ->setParent($parent) + ->setInstance($instance) + ->setInstanceId($instanceId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The instance's project and location, in the format + * `projects/{project}/locations/{location}`. + * Locations map to Google Cloud zones; for example, `us-west1-b`. + * @type string $instance_id + * Required. The name of the Parallelstore instance. + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project / location + * @type \Google\Cloud\Parallelstore\V1\Instance $instance + * Required. The instance to create. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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\Parallelstore\V1\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The instance's project and location, in the format + * `projects/{project}/locations/{location}`. + * Locations map to Google Cloud 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}/locations/{location}`. + * Locations map to Google Cloud 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 Parallelstore instance. + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project / 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 Parallelstore instance. + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project / 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. The instance to create. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Parallelstore\V1\Instance|null + */ + public function getInstance() + { + return $this->instance; + } + + public function hasInstance() + { + return isset($this->instance); + } + + public function clearInstance() + { + unset($this->instance); + } + + /** + * Required. The instance to create. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Parallelstore\V1\Instance $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1\Instance::class); + $this->instance = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 [(.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/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/DeleteInstanceRequest.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/DeleteInstanceRequest.php new file mode 100644 index 000000000000..af5164d5b835 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/DeleteInstanceRequest.php @@ -0,0 +1,155 @@ +google.cloud.parallelstore.v1.DeleteInstanceRequest + */ +class DeleteInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and 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 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the resource + * Please see {@see ParallelstoreClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\Parallelstore\V1\DeleteInstanceRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the resource + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and 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\Parallelstore\V1\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the resource + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and 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 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and 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 [(.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/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/DestinationGcsBucket.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/DestinationGcsBucket.php new file mode 100644 index 000000000000..0acc29d59857 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/DestinationGcsBucket.php @@ -0,0 +1,75 @@ +google.cloud.parallelstore.v1.DestinationGcsBucket + */ +class DestinationGcsBucket extends \Google\Protobuf\Internal\Message +{ + /** + * Required. URI to a Cloud Storage bucket in the format: + * `gs:///`. The path inside the bucket is + * optional. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * Required. URI to a Cloud Storage bucket in the format: + * `gs:///`. The path inside the bucket is + * optional. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Parallelstore\V1\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * Required. URI to a Cloud Storage bucket in the format: + * `gs:///`. The path inside the bucket is + * optional. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Required. URI to a Cloud Storage bucket in the format: + * `gs:///`. The path inside the bucket is + * optional. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/DestinationParallelstore.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/DestinationParallelstore.php new file mode 100644 index 000000000000..79e74ab6adf9 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/DestinationParallelstore.php @@ -0,0 +1,71 @@ +google.cloud.parallelstore.v1.DestinationParallelstore + */ +class DestinationParallelstore extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Root directory path to the Paralellstore filesystem, starting + * with `/`. Defaults to `/` if unset. + * + * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $path = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $path + * Optional. Root directory path to the Paralellstore filesystem, starting + * with `/`. Defaults to `/` if unset. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Parallelstore\V1\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Root directory path to the Paralellstore filesystem, starting + * with `/`. Defaults to `/` if unset. + * + * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * Optional. Root directory path to the Paralellstore filesystem, starting + * with `/`. Defaults to `/` if unset. + * + * Generated from protobuf field string path = 1 [(.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/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/DirectoryStripeLevel.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/DirectoryStripeLevel.php new file mode 100644 index 000000000000..d55b9050370c --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/DirectoryStripeLevel.php @@ -0,0 +1,68 @@ +google.cloud.parallelstore.v1.DirectoryStripeLevel + */ +class DirectoryStripeLevel +{ + /** + * If not set, DirectoryStripeLevel will default to DIRECTORY_STRIPE_LEVEL_MAX + * + * Generated from protobuf enum DIRECTORY_STRIPE_LEVEL_UNSPECIFIED = 0; + */ + const DIRECTORY_STRIPE_LEVEL_UNSPECIFIED = 0; + /** + * Minimum directory striping + * + * Generated from protobuf enum DIRECTORY_STRIPE_LEVEL_MIN = 1; + */ + const DIRECTORY_STRIPE_LEVEL_MIN = 1; + /** + * Medium directory striping + * + * Generated from protobuf enum DIRECTORY_STRIPE_LEVEL_BALANCED = 2; + */ + const DIRECTORY_STRIPE_LEVEL_BALANCED = 2; + /** + * Maximum directory striping + * + * Generated from protobuf enum DIRECTORY_STRIPE_LEVEL_MAX = 3; + */ + const DIRECTORY_STRIPE_LEVEL_MAX = 3; + + private static $valueToName = [ + self::DIRECTORY_STRIPE_LEVEL_UNSPECIFIED => 'DIRECTORY_STRIPE_LEVEL_UNSPECIFIED', + self::DIRECTORY_STRIPE_LEVEL_MIN => 'DIRECTORY_STRIPE_LEVEL_MIN', + self::DIRECTORY_STRIPE_LEVEL_BALANCED => 'DIRECTORY_STRIPE_LEVEL_BALANCED', + self::DIRECTORY_STRIPE_LEVEL_MAX => 'DIRECTORY_STRIPE_LEVEL_MAX', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __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/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ExportDataMetadata.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ExportDataMetadata.php new file mode 100644 index 000000000000..946a522a2a00 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ExportDataMetadata.php @@ -0,0 +1,351 @@ +google.cloud.parallelstore.v1.ExportDataMetadata + */ +class ExportDataMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Data transfer operation metadata. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.TransferOperationMetadata operation_metadata = 1; + */ + protected $operation_metadata = null; + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.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 = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target = ''; + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 5 [(.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 = 6 [(.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 = 7 [(.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 = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $api_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Parallelstore\V1\TransferOperationMetadata $operation_metadata + * Data transfer operation metadata. + * @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\Parallelstore\V1\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * Data transfer operation metadata. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.TransferOperationMetadata operation_metadata = 1; + * @return \Google\Cloud\Parallelstore\V1\TransferOperationMetadata|null + */ + public function getOperationMetadata() + { + return $this->operation_metadata; + } + + public function hasOperationMetadata() + { + return isset($this->operation_metadata); + } + + public function clearOperationMetadata() + { + unset($this->operation_metadata); + } + + /** + * Data transfer operation metadata. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.TransferOperationMetadata operation_metadata = 1; + * @param \Google\Cloud\Parallelstore\V1\TransferOperationMetadata $var + * @return $this + */ + public function setOperationMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1\TransferOperationMetadata::class); + $this->operation_metadata = $var; + + return $this; + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.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 = 3 [(.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 = 4 [(.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 = 4 [(.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 = 5 [(.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 = 5 [(.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 = 6 [(.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 = 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. 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 = 7 [(.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 = 7 [(.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 = 8 [(.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 = 8 [(.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/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ExportDataRequest.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ExportDataRequest.php new file mode 100644 index 000000000000..25a1ed7d4d1e --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ExportDataRequest.php @@ -0,0 +1,287 @@ +google.cloud.parallelstore.v1.ExportDataRequest + */ +class ExportDataRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes 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 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + /** + * Optional. User-specified Service Account (SA) credentials to be used when + * performing the transfer. + * Use one of the following formats: + * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * If unspecified, the Parallelstore service agent is used: + * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` + * + * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $service_account = ''; + protected $source; + protected $destination; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Parallelstore\V1\SourceParallelstore $source_parallelstore + * Parallelstore source. + * @type \Google\Cloud\Parallelstore\V1\DestinationGcsBucket $destination_gcs_bucket + * Cloud Storage destination. + * @type string $name + * Required. Name of the resource. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes 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 string $service_account + * Optional. User-specified Service Account (SA) credentials to be used when + * performing the transfer. + * Use one of the following formats: + * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * If unspecified, the Parallelstore service agent is used: + * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Parallelstore\V1\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * Parallelstore source. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.SourceParallelstore source_parallelstore = 2; + * @return \Google\Cloud\Parallelstore\V1\SourceParallelstore|null + */ + public function getSourceParallelstore() + { + return $this->readOneof(2); + } + + public function hasSourceParallelstore() + { + return $this->hasOneof(2); + } + + /** + * Parallelstore source. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.SourceParallelstore source_parallelstore = 2; + * @param \Google\Cloud\Parallelstore\V1\SourceParallelstore $var + * @return $this + */ + public function setSourceParallelstore($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1\SourceParallelstore::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Cloud Storage destination. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.DestinationGcsBucket destination_gcs_bucket = 3; + * @return \Google\Cloud\Parallelstore\V1\DestinationGcsBucket|null + */ + public function getDestinationGcsBucket() + { + return $this->readOneof(3); + } + + public function hasDestinationGcsBucket() + { + return $this->hasOneof(3); + } + + /** + * Cloud Storage destination. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.DestinationGcsBucket destination_gcs_bucket = 3; + * @param \Google\Cloud\Parallelstore\V1\DestinationGcsBucket $var + * @return $this + */ + public function setDestinationGcsBucket($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1\DestinationGcsBucket::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes 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 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server 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 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. User-specified Service Account (SA) credentials to be used when + * performing the transfer. + * Use one of the following formats: + * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * If unspecified, the Parallelstore service agent is used: + * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` + * + * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * Optional. User-specified Service Account (SA) credentials to be used when + * performing the transfer. + * Use one of the following formats: + * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * If unspecified, the Parallelstore service agent is used: + * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` + * + * Generated from protobuf field string service_account = 5 [(.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; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ExportDataResponse.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ExportDataResponse.php new file mode 100644 index 000000000000..7a2a7ca3f977 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ExportDataResponse.php @@ -0,0 +1,33 @@ +google.cloud.parallelstore.v1.ExportDataResponse + */ +class ExportDataResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Parallelstore\V1\Parallelstore::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/FileStripeLevel.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/FileStripeLevel.php new file mode 100644 index 000000000000..7f349e1ef995 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/FileStripeLevel.php @@ -0,0 +1,68 @@ +google.cloud.parallelstore.v1.FileStripeLevel + */ +class FileStripeLevel +{ + /** + * If not set, FileStripeLevel will default to FILE_STRIPE_LEVEL_BALANCED + * + * Generated from protobuf enum FILE_STRIPE_LEVEL_UNSPECIFIED = 0; + */ + const FILE_STRIPE_LEVEL_UNSPECIFIED = 0; + /** + * Minimum file striping + * + * Generated from protobuf enum FILE_STRIPE_LEVEL_MIN = 1; + */ + const FILE_STRIPE_LEVEL_MIN = 1; + /** + * Medium file striping + * + * Generated from protobuf enum FILE_STRIPE_LEVEL_BALANCED = 2; + */ + const FILE_STRIPE_LEVEL_BALANCED = 2; + /** + * Maximum file striping + * + * Generated from protobuf enum FILE_STRIPE_LEVEL_MAX = 3; + */ + const FILE_STRIPE_LEVEL_MAX = 3; + + private static $valueToName = [ + self::FILE_STRIPE_LEVEL_UNSPECIFIED => 'FILE_STRIPE_LEVEL_UNSPECIFIED', + self::FILE_STRIPE_LEVEL_MIN => 'FILE_STRIPE_LEVEL_MIN', + self::FILE_STRIPE_LEVEL_BALANCED => 'FILE_STRIPE_LEVEL_BALANCED', + self::FILE_STRIPE_LEVEL_MAX => 'FILE_STRIPE_LEVEL_MAX', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __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/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/GetInstanceRequest.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/GetInstanceRequest.php new file mode 100644 index 000000000000..1faa91f63398 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/GetInstanceRequest.php @@ -0,0 +1,86 @@ +google.cloud.parallelstore.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 = ''; + + /** + * @param string $name Required. The instance resource name, in the format + * `projects/{project_id}/locations/{location}/instances/{instance_id}`. Please see + * {@see ParallelstoreClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\Parallelstore\V1\GetInstanceRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The instance resource name, in the format + * `projects/{project_id}/locations/{location}/instances/{instance_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Parallelstore\V1\Parallelstore::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/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ImportDataMetadata.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ImportDataMetadata.php new file mode 100644 index 000000000000..e64fbf40267f --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ImportDataMetadata.php @@ -0,0 +1,351 @@ +google.cloud.parallelstore.v1.ImportDataMetadata + */ +class ImportDataMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Data transfer operation metadata. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.TransferOperationMetadata operation_metadata = 1; + */ + protected $operation_metadata = null; + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.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 = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target = ''; + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 5 [(.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 = 6 [(.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 = 7 [(.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 = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $api_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Parallelstore\V1\TransferOperationMetadata $operation_metadata + * Data transfer operation metadata. + * @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\Parallelstore\V1\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * Data transfer operation metadata. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.TransferOperationMetadata operation_metadata = 1; + * @return \Google\Cloud\Parallelstore\V1\TransferOperationMetadata|null + */ + public function getOperationMetadata() + { + return $this->operation_metadata; + } + + public function hasOperationMetadata() + { + return isset($this->operation_metadata); + } + + public function clearOperationMetadata() + { + unset($this->operation_metadata); + } + + /** + * Data transfer operation metadata. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.TransferOperationMetadata operation_metadata = 1; + * @param \Google\Cloud\Parallelstore\V1\TransferOperationMetadata $var + * @return $this + */ + public function setOperationMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1\TransferOperationMetadata::class); + $this->operation_metadata = $var; + + return $this; + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.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 = 3 [(.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 = 4 [(.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 = 4 [(.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 = 5 [(.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 = 5 [(.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 = 6 [(.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 = 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. 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 = 7 [(.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 = 7 [(.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 = 8 [(.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 = 8 [(.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/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ImportDataRequest.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ImportDataRequest.php new file mode 100644 index 000000000000..e9822439ab58 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ImportDataRequest.php @@ -0,0 +1,287 @@ +google.cloud.parallelstore.v1.ImportDataRequest + */ +class ImportDataRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes 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 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + /** + * Optional. User-specified service account credentials to be used when + * performing the transfer. + * Use one of the following formats: + * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * If unspecified, the Parallelstore service agent is used: + * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` + * + * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $service_account = ''; + protected $source; + protected $destination; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Parallelstore\V1\SourceGcsBucket $source_gcs_bucket + * The Cloud Storage source bucket and, optionally, path inside the bucket. + * @type \Google\Cloud\Parallelstore\V1\DestinationParallelstore $destination_parallelstore + * Parallelstore destination. + * @type string $name + * Required. Name of the resource. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes 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 string $service_account + * Optional. User-specified service account credentials to be used when + * performing the transfer. + * Use one of the following formats: + * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * If unspecified, the Parallelstore service agent is used: + * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Parallelstore\V1\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * The Cloud Storage source bucket and, optionally, path inside the bucket. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.SourceGcsBucket source_gcs_bucket = 2; + * @return \Google\Cloud\Parallelstore\V1\SourceGcsBucket|null + */ + public function getSourceGcsBucket() + { + return $this->readOneof(2); + } + + public function hasSourceGcsBucket() + { + return $this->hasOneof(2); + } + + /** + * The Cloud Storage source bucket and, optionally, path inside the bucket. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.SourceGcsBucket source_gcs_bucket = 2; + * @param \Google\Cloud\Parallelstore\V1\SourceGcsBucket $var + * @return $this + */ + public function setSourceGcsBucket($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1\SourceGcsBucket::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Parallelstore destination. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.DestinationParallelstore destination_parallelstore = 3; + * @return \Google\Cloud\Parallelstore\V1\DestinationParallelstore|null + */ + public function getDestinationParallelstore() + { + return $this->readOneof(3); + } + + public function hasDestinationParallelstore() + { + return $this->hasOneof(3); + } + + /** + * Parallelstore destination. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.DestinationParallelstore destination_parallelstore = 3; + * @param \Google\Cloud\Parallelstore\V1\DestinationParallelstore $var + * @return $this + */ + public function setDestinationParallelstore($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1\DestinationParallelstore::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes 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 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server 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 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. User-specified service account credentials to be used when + * performing the transfer. + * Use one of the following formats: + * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * If unspecified, the Parallelstore service agent is used: + * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` + * + * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * Optional. User-specified service account credentials to be used when + * performing the transfer. + * Use one of the following formats: + * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * If unspecified, the Parallelstore service agent is used: + * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` + * + * Generated from protobuf field string service_account = 5 [(.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; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ImportDataResponse.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ImportDataResponse.php new file mode 100644 index 000000000000..49d0ebaf5aee --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ImportDataResponse.php @@ -0,0 +1,33 @@ +google.cloud.parallelstore.v1.ImportDataResponse + */ +class ImportDataResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Parallelstore\V1\Parallelstore::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/Instance.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/Instance.php new file mode 100644 index 000000000000..af2dc82ba626 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/Instance.php @@ -0,0 +1,625 @@ +google.cloud.parallelstore.v1.Instance + */ +class Instance extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the instance, in the format + * `projects/{project}/locations/{location}/instances/{instance_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Optional. The description of the instance. 2048 characters or less. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. The instance state. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.Instance.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The time when the instance 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 when the instance was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Cloud Labels are a flexible and lightweight mechanism for + * organizing cloud resources into groups that reflect a customer's + * organizational needs and deployment strategies. See + * https://cloud.google.com/resource-manager/docs/labels-overview for details. + * + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Required. Immutable. The instance's storage capacity in Gibibytes (GiB). + * Allowed values are between 12000 and 100000, in multiples of 4000; e.g., + * 12000, 16000, 20000, ... + * + * Generated from protobuf field int64 capacity_gib = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + */ + protected $capacity_gib = 0; + /** + * Output only. The version of DAOS software running in the instance. + * + * Generated from protobuf field string daos_version = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $daos_version = ''; + /** + * Output only. A list of IPv4 addresses used for client side configuration. + * + * Generated from protobuf field repeated string access_points = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $access_points; + /** + * Optional. Immutable. The name of the Compute Engine + * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the + * instance is connected. + * + * Generated from protobuf field string network = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $network = ''; + /** + * Optional. Immutable. The ID of the IP address range being used by the + * instance's VPC network. See [Configure a VPC + * network](https://cloud.google.com/parallelstore/docs/vpc#create_and_configure_the_vpc). + * If no ID is provided, all ranges are considered. + * + * Generated from protobuf field string reserved_ip_range = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $reserved_ip_range = ''; + /** + * Output only. Immutable. The ID of the IP address range being used by the + * instance's VPC network. This field is populated by the service and contains + * the value currently used by the service. + * + * Generated from protobuf field string effective_reserved_ip_range = 14 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $effective_reserved_ip_range = ''; + /** + * Optional. Stripe level for files. Allowed values are: + * * `FILE_STRIPE_LEVEL_MIN`: offers the best performance for small size + * files. + * * `FILE_STRIPE_LEVEL_BALANCED`: balances performance for workloads + * involving a mix of small and large files. + * * `FILE_STRIPE_LEVEL_MAX`: higher throughput performance for larger files. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.FileStripeLevel file_stripe_level = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $file_stripe_level = 0; + /** + * Optional. Stripe level for directories. Allowed values are: + * * `DIRECTORY_STRIPE_LEVEL_MIN`: recommended when directories contain a + * small number of files. + * * `DIRECTORY_STRIPE_LEVEL_BALANCED`: balances performance for workloads + * involving a mix of small and large directories. + * * `DIRECTORY_STRIPE_LEVEL_MAX`: recommended for directories with a large + * number of files. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.DirectoryStripeLevel directory_stripe_level = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $directory_stripe_level = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the instance, in the format + * `projects/{project}/locations/{location}/instances/{instance_id}`. + * @type string $description + * Optional. The description of the instance. 2048 characters or less. + * @type int $state + * Output only. The instance state. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time when the instance was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time when the instance was updated. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Cloud Labels are a flexible and lightweight mechanism for + * organizing cloud resources into groups that reflect a customer's + * organizational needs and deployment strategies. See + * https://cloud.google.com/resource-manager/docs/labels-overview for details. + * @type int|string $capacity_gib + * Required. Immutable. The instance's storage capacity in Gibibytes (GiB). + * Allowed values are between 12000 and 100000, in multiples of 4000; e.g., + * 12000, 16000, 20000, ... + * @type string $daos_version + * Output only. The version of DAOS software running in the instance. + * @type array|\Google\Protobuf\Internal\RepeatedField $access_points + * Output only. A list of IPv4 addresses used for client side configuration. + * @type string $network + * Optional. Immutable. The name of the Compute Engine + * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the + * instance is connected. + * @type string $reserved_ip_range + * Optional. Immutable. The ID of the IP address range being used by the + * instance's VPC network. See [Configure a VPC + * network](https://cloud.google.com/parallelstore/docs/vpc#create_and_configure_the_vpc). + * If no ID is provided, all ranges are considered. + * @type string $effective_reserved_ip_range + * Output only. Immutable. The ID of the IP address range being used by the + * instance's VPC network. This field is populated by the service and contains + * the value currently used by the service. + * @type int $file_stripe_level + * Optional. Stripe level for files. Allowed values are: + * * `FILE_STRIPE_LEVEL_MIN`: offers the best performance for small size + * files. + * * `FILE_STRIPE_LEVEL_BALANCED`: balances performance for workloads + * involving a mix of small and large files. + * * `FILE_STRIPE_LEVEL_MAX`: higher throughput performance for larger files. + * @type int $directory_stripe_level + * Optional. Stripe level for directories. Allowed values are: + * * `DIRECTORY_STRIPE_LEVEL_MIN`: recommended when directories contain a + * small number of files. + * * `DIRECTORY_STRIPE_LEVEL_BALANCED`: balances performance for workloads + * involving a mix of small and large directories. + * * `DIRECTORY_STRIPE_LEVEL_MAX`: recommended for directories with a large + * number of files. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Parallelstore\V1\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the instance, in the format + * `projects/{project}/locations/{location}/instances/{instance_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the instance, in the format + * `projects/{project}/locations/{location}/instances/{instance_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The description of the instance. 2048 characters or less. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. The description of the instance. 2048 characters or less. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. The instance state. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.Instance.State state = 3 [(.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.parallelstore.v1.Instance.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Parallelstore\V1\Instance\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The time when the instance 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 instance 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 when the instance was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The time when the instance was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Optional. Cloud Labels are a flexible and lightweight mechanism for + * organizing cloud resources into groups that reflect a customer's + * organizational needs and deployment strategies. See + * https://cloud.google.com/resource-manager/docs/labels-overview for details. + * + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Cloud Labels are a flexible and lightweight mechanism for + * organizing cloud resources into groups that reflect a customer's + * organizational needs and deployment strategies. See + * https://cloud.google.com/resource-manager/docs/labels-overview for details. + * + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Required. Immutable. The instance's storage capacity in Gibibytes (GiB). + * Allowed values are between 12000 and 100000, in multiples of 4000; e.g., + * 12000, 16000, 20000, ... + * + * Generated from protobuf field int64 capacity_gib = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * @return int|string + */ + public function getCapacityGib() + { + return $this->capacity_gib; + } + + /** + * Required. Immutable. The instance's storage capacity in Gibibytes (GiB). + * Allowed values are between 12000 and 100000, in multiples of 4000; e.g., + * 12000, 16000, 20000, ... + * + * Generated from protobuf field int64 capacity_gib = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * @param int|string $var + * @return $this + */ + public function setCapacityGib($var) + { + GPBUtil::checkInt64($var); + $this->capacity_gib = $var; + + return $this; + } + + /** + * Output only. The version of DAOS software running in the instance. + * + * Generated from protobuf field string daos_version = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDaosVersion() + { + return $this->daos_version; + } + + /** + * Output only. The version of DAOS software running in the instance. + * + * Generated from protobuf field string daos_version = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDaosVersion($var) + { + GPBUtil::checkString($var, True); + $this->daos_version = $var; + + return $this; + } + + /** + * Output only. A list of IPv4 addresses used for client side configuration. + * + * Generated from protobuf field repeated string access_points = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAccessPoints() + { + return $this->access_points; + } + + /** + * Output only. A list of IPv4 addresses used for client side configuration. + * + * Generated from protobuf field repeated string access_points = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAccessPoints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->access_points = $arr; + + return $this; + } + + /** + * Optional. Immutable. The name of the Compute Engine + * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the + * instance is connected. + * + * Generated from protobuf field string network = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * Optional. Immutable. The name of the Compute Engine + * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the + * instance is connected. + * + * Generated from protobuf field string network = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * Optional. Immutable. The ID of the IP address range being used by the + * instance's VPC network. See [Configure a VPC + * network](https://cloud.google.com/parallelstore/docs/vpc#create_and_configure_the_vpc). + * If no ID is provided, all ranges are considered. + * + * Generated from protobuf field string reserved_ip_range = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getReservedIpRange() + { + return $this->reserved_ip_range; + } + + /** + * Optional. Immutable. The ID of the IP address range being used by the + * instance's VPC network. See [Configure a VPC + * network](https://cloud.google.com/parallelstore/docs/vpc#create_and_configure_the_vpc). + * If no ID is provided, all ranges are considered. + * + * Generated from protobuf field string reserved_ip_range = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setReservedIpRange($var) + { + GPBUtil::checkString($var, True); + $this->reserved_ip_range = $var; + + return $this; + } + + /** + * Output only. Immutable. The ID of the IP address range being used by the + * instance's VPC network. This field is populated by the service and contains + * the value currently used by the service. + * + * Generated from protobuf field string effective_reserved_ip_range = 14 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getEffectiveReservedIpRange() + { + return $this->effective_reserved_ip_range; + } + + /** + * Output only. Immutable. The ID of the IP address range being used by the + * instance's VPC network. This field is populated by the service and contains + * the value currently used by the service. + * + * Generated from protobuf field string effective_reserved_ip_range = 14 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setEffectiveReservedIpRange($var) + { + GPBUtil::checkString($var, True); + $this->effective_reserved_ip_range = $var; + + return $this; + } + + /** + * Optional. Stripe level for files. Allowed values are: + * * `FILE_STRIPE_LEVEL_MIN`: offers the best performance for small size + * files. + * * `FILE_STRIPE_LEVEL_BALANCED`: balances performance for workloads + * involving a mix of small and large files. + * * `FILE_STRIPE_LEVEL_MAX`: higher throughput performance for larger files. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.FileStripeLevel file_stripe_level = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getFileStripeLevel() + { + return $this->file_stripe_level; + } + + /** + * Optional. Stripe level for files. Allowed values are: + * * `FILE_STRIPE_LEVEL_MIN`: offers the best performance for small size + * files. + * * `FILE_STRIPE_LEVEL_BALANCED`: balances performance for workloads + * involving a mix of small and large files. + * * `FILE_STRIPE_LEVEL_MAX`: higher throughput performance for larger files. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.FileStripeLevel file_stripe_level = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setFileStripeLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Parallelstore\V1\FileStripeLevel::class); + $this->file_stripe_level = $var; + + return $this; + } + + /** + * Optional. Stripe level for directories. Allowed values are: + * * `DIRECTORY_STRIPE_LEVEL_MIN`: recommended when directories contain a + * small number of files. + * * `DIRECTORY_STRIPE_LEVEL_BALANCED`: balances performance for workloads + * involving a mix of small and large directories. + * * `DIRECTORY_STRIPE_LEVEL_MAX`: recommended for directories with a large + * number of files. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.DirectoryStripeLevel directory_stripe_level = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getDirectoryStripeLevel() + { + return $this->directory_stripe_level; + } + + /** + * Optional. Stripe level for directories. Allowed values are: + * * `DIRECTORY_STRIPE_LEVEL_MIN`: recommended when directories contain a + * small number of files. + * * `DIRECTORY_STRIPE_LEVEL_BALANCED`: balances performance for workloads + * involving a mix of small and large directories. + * * `DIRECTORY_STRIPE_LEVEL_MAX`: recommended for directories with a large + * number of files. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.DirectoryStripeLevel directory_stripe_level = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setDirectoryStripeLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Parallelstore\V1\DirectoryStripeLevel::class); + $this->directory_stripe_level = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/Instance/State.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/Instance/State.php new file mode 100644 index 000000000000..8eabb8656dcb --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/Instance/State.php @@ -0,0 +1,85 @@ +google.cloud.parallelstore.v1.Instance.State + */ +class 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 ACTIVE = 2; + */ + const ACTIVE = 2; + /** + * The instance is being deleted. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * The instance is not usable. + * + * Generated from protobuf enum FAILED = 4; + */ + const FAILED = 4; + /** + * The instance is being upgraded. + * + * Generated from protobuf enum UPGRADING = 5; + */ + const UPGRADING = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::ACTIVE => 'ACTIVE', + self::DELETING => 'DELETING', + self::FAILED => 'FAILED', + self::UPGRADING => 'UPGRADING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no 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\Parallelstore\V1\Instance_State::class); + diff --git a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ListInstancesRequest.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ListInstancesRequest.php new file mode 100644 index 000000000000..0a02c88d3081 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ListInstancesRequest.php @@ -0,0 +1,237 @@ +google.cloud.parallelstore.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}`. + * To retrieve instance information for all locations, use "-" as the value of + * `{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, the server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Filtering results. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The project and location for which to retrieve instance + * information, in the format `projects/{project_id}/locations/{location}`. + * + * To retrieve instance information for all locations, use "-" as the value of + * `{location}`. Please see + * {@see ParallelstoreClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Parallelstore\V1\ListInstancesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project and location for which to retrieve instance + * information, in the format `projects/{project_id}/locations/{location}`. + * To retrieve instance information for all locations, use "-" as the value of + * `{location}`. + * @type int $page_size + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, the server will pick an appropriate default. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * @type string $filter + * Optional. Filtering results. + * @type string $order_by + * Optional. Hint for how to order the results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Parallelstore\V1\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location for which to retrieve instance + * information, in the format `projects/{project_id}/locations/{location}`. + * To retrieve instance information for all locations, use "-" as the value of + * `{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project and location for which to retrieve instance + * information, in the format `projects/{project_id}/locations/{location}`. + * To retrieve instance information for all locations, use "-" as the value of + * `{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Requested page size. Server may return fewer items than + * requested. 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. Requested page size. Server may return fewer items than + * requested. If unspecified, the server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Filtering results. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filtering results. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ListInstancesResponse.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ListInstancesResponse.php new file mode 100644 index 000000000000..c8b9fd39f5d9 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ListInstancesResponse.php @@ -0,0 +1,136 @@ +google.cloud.parallelstore.v1.ListInstancesResponse + */ +class ListInstancesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Parallelstore instances. + * + * Generated from protobuf field repeated .google.cloud.parallelstore.v1.Instance instances = 1; + */ + private $instances; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Parallelstore\V1\Instance>|\Google\Protobuf\Internal\RepeatedField $instances + * The list of Parallelstore instances. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Parallelstore\V1\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * The list of Parallelstore instances. + * + * Generated from protobuf field repeated .google.cloud.parallelstore.v1.Instance instances = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInstances() + { + return $this->instances; + } + + /** + * The list of Parallelstore instances. + * + * Generated from protobuf field repeated .google.cloud.parallelstore.v1.Instance instances = 1; + * @param array<\Google\Cloud\Parallelstore\V1\Instance>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInstances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Parallelstore\V1\Instance::class); + $this->instances = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/OperationMetadata.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/OperationMetadata.php new file mode 100644 index 000000000000..98a34bef6798 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/OperationMetadata.php @@ -0,0 +1,307 @@ +google.cloud.parallelstore.v1.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target = ''; + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $verb = ''; + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status_message = ''; + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been cancelled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $requested_cancellation = false; + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $api_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time the operation finished running. + * @type string $target + * Output only. Server-defined resource path for the target of the operation. + * @type string $verb + * Output only. Name of the verb executed by the operation. + * @type string $status_message + * Output only. Human-readable status of the operation, if any. + * @type bool $requested_cancellation + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been cancelled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * @type string $api_version + * Output only. API version used to start the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Parallelstore\V1\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStatusMessage() + { + return $this->status_message; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStatusMessage($var) + { + GPBUtil::checkString($var, True); + $this->status_message = $var; + + return $this; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been cancelled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRequestedCancellation() + { + return $this->requested_cancellation; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been cancelled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRequestedCancellation($var) + { + GPBUtil::checkBool($var); + $this->requested_cancellation = $var; + + return $this; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setApiVersion($var) + { + GPBUtil::checkString($var, True); + $this->api_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/SourceGcsBucket.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/SourceGcsBucket.php new file mode 100644 index 000000000000..6b042397ff31 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/SourceGcsBucket.php @@ -0,0 +1,75 @@ +google.cloud.parallelstore.v1.SourceGcsBucket + */ +class SourceGcsBucket extends \Google\Protobuf\Internal\Message +{ + /** + * Required. URI to a Cloud Storage bucket in the format: + * `gs:///`. The path inside the bucket is + * optional. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * Required. URI to a Cloud Storage bucket in the format: + * `gs:///`. The path inside the bucket is + * optional. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Parallelstore\V1\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * Required. URI to a Cloud Storage bucket in the format: + * `gs:///`. The path inside the bucket is + * optional. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Required. URI to a Cloud Storage bucket in the format: + * `gs:///`. The path inside the bucket is + * optional. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/SourceParallelstore.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/SourceParallelstore.php new file mode 100644 index 000000000000..63a37aaeebf2 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/SourceParallelstore.php @@ -0,0 +1,71 @@ +google.cloud.parallelstore.v1.SourceParallelstore + */ +class SourceParallelstore extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Root directory path to the Paralellstore filesystem, starting + * with `/`. Defaults to `/` if unset. + * + * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $path = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $path + * Optional. Root directory path to the Paralellstore filesystem, starting + * with `/`. Defaults to `/` if unset. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Parallelstore\V1\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Root directory path to the Paralellstore filesystem, starting + * with `/`. Defaults to `/` if unset. + * + * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * Optional. Root directory path to the Paralellstore filesystem, starting + * with `/`. Defaults to `/` if unset. + * + * Generated from protobuf field string path = 1 [(.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/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/TransferCounters.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/TransferCounters.php new file mode 100644 index 000000000000..9b4b96f6fd44 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/TransferCounters.php @@ -0,0 +1,261 @@ +google.cloud.parallelstore.v1.TransferCounters + */ +class TransferCounters extends \Google\Protobuf\Internal\Message +{ + /** + * Objects found in the data source that are scheduled to be transferred, + * excluding any that are filtered based on object conditions or skipped due + * to sync. + * + * Generated from protobuf field int64 objects_found = 1; + */ + protected $objects_found = 0; + /** + * Bytes found in the data source that are scheduled to be transferred, + * excluding any that are filtered based on object conditions or skipped due + * to sync. + * + * Generated from protobuf field int64 bytes_found = 2; + */ + protected $bytes_found = 0; + /** + * Objects in the data source that are not transferred because they already + * exist in the data destination. + * + * Generated from protobuf field int64 objects_skipped = 3; + */ + protected $objects_skipped = 0; + /** + * Bytes in the data source that are not transferred because they already + * exist in the data destination. + * + * Generated from protobuf field int64 bytes_skipped = 4; + */ + protected $bytes_skipped = 0; + /** + * Objects that are copied to the data destination. + * + * Generated from protobuf field int64 objects_copied = 5; + */ + protected $objects_copied = 0; + /** + * Bytes that are copied to the data destination. + * + * Generated from protobuf field int64 bytes_copied = 6; + */ + protected $bytes_copied = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $objects_found + * Objects found in the data source that are scheduled to be transferred, + * excluding any that are filtered based on object conditions or skipped due + * to sync. + * @type int|string $bytes_found + * Bytes found in the data source that are scheduled to be transferred, + * excluding any that are filtered based on object conditions or skipped due + * to sync. + * @type int|string $objects_skipped + * Objects in the data source that are not transferred because they already + * exist in the data destination. + * @type int|string $bytes_skipped + * Bytes in the data source that are not transferred because they already + * exist in the data destination. + * @type int|string $objects_copied + * Objects that are copied to the data destination. + * @type int|string $bytes_copied + * Bytes that are copied to the data destination. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Parallelstore\V1\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * Objects found in the data source that are scheduled to be transferred, + * excluding any that are filtered based on object conditions or skipped due + * to sync. + * + * Generated from protobuf field int64 objects_found = 1; + * @return int|string + */ + public function getObjectsFound() + { + return $this->objects_found; + } + + /** + * Objects found in the data source that are scheduled to be transferred, + * excluding any that are filtered based on object conditions or skipped due + * to sync. + * + * Generated from protobuf field int64 objects_found = 1; + * @param int|string $var + * @return $this + */ + public function setObjectsFound($var) + { + GPBUtil::checkInt64($var); + $this->objects_found = $var; + + return $this; + } + + /** + * Bytes found in the data source that are scheduled to be transferred, + * excluding any that are filtered based on object conditions or skipped due + * to sync. + * + * Generated from protobuf field int64 bytes_found = 2; + * @return int|string + */ + public function getBytesFound() + { + return $this->bytes_found; + } + + /** + * Bytes found in the data source that are scheduled to be transferred, + * excluding any that are filtered based on object conditions or skipped due + * to sync. + * + * Generated from protobuf field int64 bytes_found = 2; + * @param int|string $var + * @return $this + */ + public function setBytesFound($var) + { + GPBUtil::checkInt64($var); + $this->bytes_found = $var; + + return $this; + } + + /** + * Objects in the data source that are not transferred because they already + * exist in the data destination. + * + * Generated from protobuf field int64 objects_skipped = 3; + * @return int|string + */ + public function getObjectsSkipped() + { + return $this->objects_skipped; + } + + /** + * Objects in the data source that are not transferred because they already + * exist in the data destination. + * + * Generated from protobuf field int64 objects_skipped = 3; + * @param int|string $var + * @return $this + */ + public function setObjectsSkipped($var) + { + GPBUtil::checkInt64($var); + $this->objects_skipped = $var; + + return $this; + } + + /** + * Bytes in the data source that are not transferred because they already + * exist in the data destination. + * + * Generated from protobuf field int64 bytes_skipped = 4; + * @return int|string + */ + public function getBytesSkipped() + { + return $this->bytes_skipped; + } + + /** + * Bytes in the data source that are not transferred because they already + * exist in the data destination. + * + * Generated from protobuf field int64 bytes_skipped = 4; + * @param int|string $var + * @return $this + */ + public function setBytesSkipped($var) + { + GPBUtil::checkInt64($var); + $this->bytes_skipped = $var; + + return $this; + } + + /** + * Objects that are copied to the data destination. + * + * Generated from protobuf field int64 objects_copied = 5; + * @return int|string + */ + public function getObjectsCopied() + { + return $this->objects_copied; + } + + /** + * Objects that are copied to the data destination. + * + * Generated from protobuf field int64 objects_copied = 5; + * @param int|string $var + * @return $this + */ + public function setObjectsCopied($var) + { + GPBUtil::checkInt64($var); + $this->objects_copied = $var; + + return $this; + } + + /** + * Bytes that are copied to the data destination. + * + * Generated from protobuf field int64 bytes_copied = 6; + * @return int|string + */ + public function getBytesCopied() + { + return $this->bytes_copied; + } + + /** + * Bytes that are copied to the data destination. + * + * Generated from protobuf field int64 bytes_copied = 6; + * @param int|string $var + * @return $this + */ + public function setBytesCopied($var) + { + GPBUtil::checkInt64($var); + $this->bytes_copied = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/TransferOperationMetadata.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/TransferOperationMetadata.php new file mode 100644 index 000000000000..0cdbf05167ac --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/TransferOperationMetadata.php @@ -0,0 +1,261 @@ +google.cloud.parallelstore.v1.TransferOperationMetadata + */ +class TransferOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The progress of the transfer operation. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.TransferCounters counters = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $counters = null; + /** + * Output only. The type of transfer occurring. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.TransferType transfer_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $transfer_type = 0; + protected $source; + protected $destination; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Parallelstore\V1\SourceParallelstore $source_parallelstore + * Output only. Parallelstore source. + * @type \Google\Cloud\Parallelstore\V1\SourceGcsBucket $source_gcs_bucket + * Output only. Cloud Storage source. + * @type \Google\Cloud\Parallelstore\V1\DestinationGcsBucket $destination_gcs_bucket + * Output only. Cloud Storage destination. + * @type \Google\Cloud\Parallelstore\V1\DestinationParallelstore $destination_parallelstore + * Output only. Parallelstore destination. + * @type \Google\Cloud\Parallelstore\V1\TransferCounters $counters + * Output only. The progress of the transfer operation. + * @type int $transfer_type + * Output only. The type of transfer occurring. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Parallelstore\V1\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Parallelstore source. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.SourceParallelstore source_parallelstore = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Parallelstore\V1\SourceParallelstore|null + */ + public function getSourceParallelstore() + { + return $this->readOneof(7); + } + + public function hasSourceParallelstore() + { + return $this->hasOneof(7); + } + + /** + * Output only. Parallelstore source. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.SourceParallelstore source_parallelstore = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Parallelstore\V1\SourceParallelstore $var + * @return $this + */ + public function setSourceParallelstore($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1\SourceParallelstore::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Output only. Cloud Storage source. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.SourceGcsBucket source_gcs_bucket = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Parallelstore\V1\SourceGcsBucket|null + */ + public function getSourceGcsBucket() + { + return $this->readOneof(8); + } + + public function hasSourceGcsBucket() + { + return $this->hasOneof(8); + } + + /** + * Output only. Cloud Storage source. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.SourceGcsBucket source_gcs_bucket = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Parallelstore\V1\SourceGcsBucket $var + * @return $this + */ + public function setSourceGcsBucket($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1\SourceGcsBucket::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Output only. Cloud Storage destination. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.DestinationGcsBucket destination_gcs_bucket = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Parallelstore\V1\DestinationGcsBucket|null + */ + public function getDestinationGcsBucket() + { + return $this->readOneof(9); + } + + public function hasDestinationGcsBucket() + { + return $this->hasOneof(9); + } + + /** + * Output only. Cloud Storage destination. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.DestinationGcsBucket destination_gcs_bucket = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Parallelstore\V1\DestinationGcsBucket $var + * @return $this + */ + public function setDestinationGcsBucket($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1\DestinationGcsBucket::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Output only. Parallelstore destination. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.DestinationParallelstore destination_parallelstore = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Parallelstore\V1\DestinationParallelstore|null + */ + public function getDestinationParallelstore() + { + return $this->readOneof(10); + } + + public function hasDestinationParallelstore() + { + return $this->hasOneof(10); + } + + /** + * Output only. Parallelstore destination. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.DestinationParallelstore destination_parallelstore = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Parallelstore\V1\DestinationParallelstore $var + * @return $this + */ + public function setDestinationParallelstore($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1\DestinationParallelstore::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * Output only. The progress of the transfer operation. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.TransferCounters counters = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Parallelstore\V1\TransferCounters|null + */ + public function getCounters() + { + return $this->counters; + } + + public function hasCounters() + { + return isset($this->counters); + } + + public function clearCounters() + { + unset($this->counters); + } + + /** + * Output only. The progress of the transfer operation. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.TransferCounters counters = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Parallelstore\V1\TransferCounters $var + * @return $this + */ + public function setCounters($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1\TransferCounters::class); + $this->counters = $var; + + return $this; + } + + /** + * Output only. The type of transfer occurring. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.TransferType transfer_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getTransferType() + { + return $this->transfer_type; + } + + /** + * Output only. The type of transfer occurring. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.TransferType transfer_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setTransferType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Parallelstore\V1\TransferType::class); + $this->transfer_type = $var; + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/TransferType.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/TransferType.php new file mode 100644 index 000000000000..cecde2a1b640 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/TransferType.php @@ -0,0 +1,61 @@ +google.cloud.parallelstore.v1.TransferType + */ +class TransferType +{ + /** + * Zero is an illegal value. + * + * Generated from protobuf enum TRANSFER_TYPE_UNSPECIFIED = 0; + */ + const TRANSFER_TYPE_UNSPECIFIED = 0; + /** + * Imports to Parallelstore. + * + * Generated from protobuf enum IMPORT = 1; + */ + const IMPORT = 1; + /** + * Exports from Parallelstore. + * + * Generated from protobuf enum EXPORT = 2; + */ + const EXPORT = 2; + + private static $valueToName = [ + self::TRANSFER_TYPE_UNSPECIFIED => 'TRANSFER_TYPE_UNSPECIFIED', + self::IMPORT => 'IMPORT', + self::EXPORT => 'EXPORT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __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/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/UpdateInstanceRequest.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/UpdateInstanceRequest.php new file mode 100644 index 000000000000..e2e23b6223a6 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/UpdateInstanceRequest.php @@ -0,0 +1,225 @@ +google.cloud.parallelstore.v1.UpdateInstanceRequest + */ +class UpdateInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Mask of fields to update. Field mask is used to specify the + * fields to be overwritten in the Instance resource by the update. At least + * one path must be supplied in this field. The fields specified in the + * update_mask are relative to the resource, not the full request. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The instance to update. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\Parallelstore\V1\Instance $instance Required. The instance to update. + * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. Field mask is used to specify the + * fields to be overwritten in the Instance resource by the update. At least + * one path must be supplied in this field. The fields specified in the + * update_mask are relative to the resource, not the full request. + * + * @return \Google\Cloud\Parallelstore\V1\UpdateInstanceRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Parallelstore\V1\Instance $instance, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setInstance($instance) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Mask of fields to update. Field mask is used to specify the + * fields to be overwritten in the Instance resource by the update. At least + * one path must be supplied in this field. The fields specified in the + * update_mask are relative to the resource, not the full request. + * @type \Google\Cloud\Parallelstore\V1\Instance $instance + * Required. The instance to update. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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\Parallelstore\V1\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * Required. Mask of fields to update. Field mask is used to specify the + * fields to be overwritten in the Instance resource by the update. At least + * one path must be supplied in this field. The fields specified in the + * update_mask are relative to the resource, not the full request. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Mask of fields to update. Field mask is used to specify the + * fields to be overwritten in the Instance resource by the update. At least + * one path must be supplied in this field. The fields specified in the + * update_mask are relative to the resource, not the full request. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The instance to update. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Parallelstore\V1\Instance|null + */ + public function getInstance() + { + return $this->instance; + } + + public function hasInstance() + { + return isset($this->instance); + } + + public function clearInstance() + { + unset($this->instance); + } + + /** + * Required. The instance to update. + * + * Generated from protobuf field .google.cloud.parallelstore.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Parallelstore\V1\Instance $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1\Instance::class); + $this->instance = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/create_instance.php b/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/create_instance.php new file mode 100644 index 000000000000..56f45bf3e947 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/create_instance.php @@ -0,0 +1,104 @@ +setCapacityGib($instanceCapacityGib); + $request = (new CreateInstanceRequest()) + ->setParent($formattedParent) + ->setInstanceId($instanceId) + ->setInstance($instance); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $parallelstoreClient->createInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ParallelstoreClient::locationName('[PROJECT]', '[LOCATION]'); + $instanceId = '[INSTANCE_ID]'; + $instanceCapacityGib = 0; + + create_instance_sample($formattedParent, $instanceId, $instanceCapacityGib); +} +// [END parallelstore_v1_generated_Parallelstore_CreateInstance_sync] diff --git a/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/delete_instance.php b/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/delete_instance.php new file mode 100644 index 000000000000..8202d349d9ba --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/delete_instance.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $parallelstoreClient->deleteInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ParallelstoreClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + delete_instance_sample($formattedName); +} +// [END parallelstore_v1_generated_Parallelstore_DeleteInstance_sync] diff --git a/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/export_data.php b/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/export_data.php new file mode 100644 index 000000000000..9a64b7551feb --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/export_data.php @@ -0,0 +1,83 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $parallelstoreClient->exportData($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ExportDataResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ParallelstoreClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + export_data_sample($formattedName); +} +// [END parallelstore_v1_generated_Parallelstore_ExportData_sync] diff --git a/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/get_instance.php b/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/get_instance.php new file mode 100644 index 000000000000..aba7bdaedf3d --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/get_instance.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Instance $response */ + $response = $parallelstoreClient->getInstance($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ParallelstoreClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + get_instance_sample($formattedName); +} +// [END parallelstore_v1_generated_Parallelstore_GetInstance_sync] diff --git a/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/get_location.php b/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/get_location.php new file mode 100644 index 000000000000..0950b50a4c68 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END parallelstore_v1_generated_Parallelstore_GetLocation_sync] diff --git a/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/import_data.php b/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/import_data.php new file mode 100644 index 000000000000..a4e745a904ed --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/import_data.php @@ -0,0 +1,83 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $parallelstoreClient->importData($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ImportDataResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ParallelstoreClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + import_data_sample($formattedName); +} +// [END parallelstore_v1_generated_Parallelstore_ImportData_sync] diff --git a/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/list_instances.php b/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/list_instances.php new file mode 100644 index 000000000000..8388dfa1a884 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/list_instances.php @@ -0,0 +1,80 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $parallelstoreClient->listInstances($request); + + /** @var Instance $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ParallelstoreClient::locationName('[PROJECT]', '[LOCATION]'); + + list_instances_sample($formattedParent); +} +// [END parallelstore_v1_generated_Parallelstore_ListInstances_sync] diff --git a/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/list_locations.php b/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/list_locations.php new file mode 100644 index 000000000000..05b2ed1ff36a --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END parallelstore_v1_generated_Parallelstore_ListLocations_sync] diff --git a/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/update_instance.php b/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/update_instance.php new file mode 100644 index 000000000000..a4aff2499ae7 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/update_instance.php @@ -0,0 +1,89 @@ +setCapacityGib($instanceCapacityGib); + $request = (new UpdateInstanceRequest()) + ->setUpdateMask($updateMask) + ->setInstance($instance); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $parallelstoreClient->updateInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $instanceCapacityGib = 0; + + update_instance_sample($instanceCapacityGib); +} +// [END parallelstore_v1_generated_Parallelstore_UpdateInstance_sync] diff --git a/owl-bot-staging/Parallelstore/v1/src/V1/Client/ParallelstoreClient.php b/owl-bot-staging/Parallelstore/v1/src/V1/Client/ParallelstoreClient.php new file mode 100644 index 000000000000..93e81b6aa231 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1/src/V1/Client/ParallelstoreClient.php @@ -0,0 +1,607 @@ + createInstanceAsync(CreateInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteInstanceAsync(DeleteInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface exportDataAsync(ExportDataRequest $request, array $optionalArgs = []) + * @method PromiseInterface getInstanceAsync(GetInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface importDataAsync(ImportDataRequest $request, array $optionalArgs = []) + * @method PromiseInterface listInstancesAsync(ListInstancesRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateInstanceAsync(UpdateInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class ParallelstoreClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.parallelstore.v1.Parallelstore'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'parallelstore.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'parallelstore.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/parallelstore_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/parallelstore_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/parallelstore_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/parallelstore_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a address + * resource. + * + * @param string $project + * @param string $region + * @param string $address + * + * @return string The formatted address resource. + */ + public static function addressName(string $project, string $region, string $address): string + { + return self::getPathTemplate('address')->render([ + 'project' => $project, + 'region' => $region, + 'address' => $address, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a instance + * resource. + * + * @param string $project + * @param string $location + * @param string $instance + * + * @return string The formatted instance resource. + */ + public static function instanceName(string $project, string $location, string $instance): string + { + return self::getPathTemplate('instance')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $project + * @param string $network + * + * @return string The formatted network resource. + */ + public static function networkName(string $project, string $network): string + { + return self::getPathTemplate('network')->render([ + 'project' => $project, + 'network' => $network, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * service_account resource. + * + * @param string $project + * @param string $serviceAccount + * + * @return string The formatted service_account resource. + */ + public static function serviceAccountName(string $project, string $serviceAccount): string + { + return self::getPathTemplate('serviceAccount')->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 + * - address: projects/{project}/regions/{region}/addresses/{address} + * - instance: projects/{project}/locations/{location}/instances/{instance} + * - location: projects/{project}/locations/{location} + * - network: projects/{project}/global/networks/{network} + * - 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(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'parallelstore.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); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a Parallelstore instance in a given project and location. + * + * The async variant is {@see ParallelstoreClient::createInstanceAsync()} . + * + * @example samples/V1/ParallelstoreClient/create_instance.php + * + * @param CreateInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createInstance(CreateInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateInstance', $request, $callOptions)->wait(); + } + + /** + * Deletes a single instance. + * + * The async variant is {@see ParallelstoreClient::deleteInstanceAsync()} . + * + * @example samples/V1/ParallelstoreClient/delete_instance.php + * + * @param DeleteInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteInstance(DeleteInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteInstance', $request, $callOptions)->wait(); + } + + /** + * Copies data from Parallelstore to Cloud Storage. + * + * The async variant is {@see ParallelstoreClient::exportDataAsync()} . + * + * @example samples/V1/ParallelstoreClient/export_data.php + * + * @param ExportDataRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function exportData(ExportDataRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ExportData', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single instance. + * + * The async variant is {@see ParallelstoreClient::getInstanceAsync()} . + * + * @example samples/V1/ParallelstoreClient/get_instance.php + * + * @param GetInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Instance + * + * @throws ApiException Thrown if the API call fails. + */ + public function getInstance(GetInstanceRequest $request, array $callOptions = []): Instance + { + return $this->startApiCall('GetInstance', $request, $callOptions)->wait(); + } + + /** + * Copies data from Cloud Storage to Parallelstore. + * + * The async variant is {@see ParallelstoreClient::importDataAsync()} . + * + * @example samples/V1/ParallelstoreClient/import_data.php + * + * @param ImportDataRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function importData(ImportDataRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ImportData', $request, $callOptions)->wait(); + } + + /** + * Lists all instances in a given project and location. + * + * The async variant is {@see ParallelstoreClient::listInstancesAsync()} . + * + * @example samples/V1/ParallelstoreClient/list_instances.php + * + * @param ListInstancesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listInstances(ListInstancesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListInstances', $request, $callOptions); + } + + /** + * Updates the parameters of a single instance. + * + * The async variant is {@see ParallelstoreClient::updateInstanceAsync()} . + * + * @example samples/V1/ParallelstoreClient/update_instance.php + * + * @param UpdateInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateInstance(UpdateInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateInstance', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see ParallelstoreClient::getLocationAsync()} . + * + * @example samples/V1/ParallelstoreClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see ParallelstoreClient::listLocationsAsync()} . + * + * @example samples/V1/ParallelstoreClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/Parallelstore/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Parallelstore/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..2eaf40bfd51c --- /dev/null +++ b/owl-bot-staging/Parallelstore/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.parallelstore.v1", + "libraryPackage": "Google\\Cloud\\Parallelstore\\V1", + "services": { + "Parallelstore": { + "clients": { + "grpc": { + "libraryClient": "ParallelstoreGapicClient", + "rpcs": { + "CreateInstance": { + "methods": [ + "createInstance" + ] + }, + "DeleteInstance": { + "methods": [ + "deleteInstance" + ] + }, + "ExportData": { + "methods": [ + "exportData" + ] + }, + "GetInstance": { + "methods": [ + "getInstance" + ] + }, + "ImportData": { + "methods": [ + "importData" + ] + }, + "ListInstances": { + "methods": [ + "listInstances" + ] + }, + "UpdateInstance": { + "methods": [ + "updateInstance" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Parallelstore/v1/src/V1/resources/parallelstore_client_config.json b/owl-bot-staging/Parallelstore/v1/src/V1/resources/parallelstore_client_config.json new file mode 100644 index 000000000000..bc0e63dce49b --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1/src/V1/resources/parallelstore_client_config.json @@ -0,0 +1,67 @@ +{ + "interfaces": { + "google.cloud.parallelstore.v1.Parallelstore": { + "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": { + "CreateInstance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteInstance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ExportData": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetInstance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ImportData": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListInstances": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateInstance": { + "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" + } + } + } + } +} diff --git a/owl-bot-staging/Parallelstore/v1/src/V1/resources/parallelstore_descriptor_config.php b/owl-bot-staging/Parallelstore/v1/src/V1/resources/parallelstore_descriptor_config.php new file mode 100644 index 000000000000..8f886377a798 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1/src/V1/resources/parallelstore_descriptor_config.php @@ -0,0 +1,197 @@ + [ + 'google.cloud.parallelstore.v1.Parallelstore' => [ + 'CreateInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Parallelstore\V1\Instance', + 'metadataReturnType' => '\Google\Cloud\Parallelstore\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Parallelstore\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ExportData' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Parallelstore\V1\ExportDataResponse', + 'metadataReturnType' => '\Google\Cloud\Parallelstore\V1\ExportDataMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ImportData' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Parallelstore\V1\ImportDataResponse', + 'metadataReturnType' => '\Google\Cloud\Parallelstore\V1\ImportDataMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Parallelstore\V1\Instance', + 'metadataReturnType' => '\Google\Cloud\Parallelstore\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'instance.name', + 'fieldAccessors' => [ + 'getInstance', + 'getName', + ], + ], + ], + ], + 'GetInstance' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Parallelstore\V1\Instance', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListInstances' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getInstances', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Parallelstore\V1\ListInstancesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'address' => 'projects/{project}/regions/{region}/addresses/{address}', + 'instance' => 'projects/{project}/locations/{location}/instances/{instance}', + 'location' => 'projects/{project}/locations/{location}', + 'network' => 'projects/{project}/global/networks/{network}', + 'serviceAccount' => 'projects/{project}/serviceAccounts/{service_account}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Parallelstore/v1/src/V1/resources/parallelstore_rest_client_config.php b/owl-bot-staging/Parallelstore/v1/src/V1/resources/parallelstore_rest_client_config.php new file mode 100644 index 000000000000..f7d9fb7afb54 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1/src/V1/resources/parallelstore_rest_client_config.php @@ -0,0 +1,188 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.parallelstore.v1.Parallelstore' => [ + 'CreateInstance' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/instances', + 'body' => 'instance', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'instance_id', + ], + ], + 'DeleteInstance' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ExportData' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:exportData', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetInstance' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ImportData' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:importData', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListInstances' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/instances', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateInstance' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{instance.name=projects/*/locations/*/instances/*}', + 'body' => 'instance', + 'placeholders' => [ + 'instance.name' => [ + 'getters' => [ + 'getInstance', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Parallelstore/v1/tests/Unit/V1/Client/ParallelstoreClientTest.php b/owl-bot-staging/Parallelstore/v1/tests/Unit/V1/Client/ParallelstoreClientTest.php new file mode 100644 index 000000000000..0b34f04570c6 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1/tests/Unit/V1/Client/ParallelstoreClientTest.php @@ -0,0 +1,1100 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ParallelstoreClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ParallelstoreClient($options); + } + + /** @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'; + $capacityGib = 498394811; + $daosVersion = 'daosVersion-1809382982'; + $network = 'network1843485230'; + $reservedIpRange = 'reservedIpRange-1082940580'; + $effectiveReservedIpRange = 'effectiveReservedIpRange-598066492'; + $expectedResponse = new Instance(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setCapacityGib($capacityGib); + $expectedResponse->setDaosVersion($daosVersion); + $expectedResponse->setNetwork($network); + $expectedResponse->setReservedIpRange($reservedIpRange); + $expectedResponse->setEffectiveReservedIpRange($effectiveReservedIpRange); + $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(); + $instanceCapacityGib = 1813257007; + $instance->setCapacityGib($instanceCapacityGib); + $request = (new CreateInstanceRequest()) + ->setParent($formattedParent) + ->setInstanceId($instanceId) + ->setInstance($instance); + $response = $gapicClient->createInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.parallelstore.v1.Parallelstore/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(); + $instanceCapacityGib = 1813257007; + $instance->setCapacityGib($instanceCapacityGib); + $request = (new CreateInstanceRequest()) + ->setParent($formattedParent) + ->setInstanceId($instanceId) + ->setInstance($instance); + $response = $gapicClient->createInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createInstanceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteInstanceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new DeleteInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.parallelstore.v1.Parallelstore/DeleteInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteInstanceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteInstanceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new DeleteInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteInstanceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function exportDataTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/exportDataTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new ExportDataResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/exportDataTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new ExportDataRequest()) + ->setName($formattedName); + $response = $gapicClient->exportData($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.parallelstore.v1.Parallelstore/ExportData', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportDataTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function exportDataExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/exportDataTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new ExportDataRequest()) + ->setName($formattedName); + $response = $gapicClient->exportData($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportDataTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getInstanceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $capacityGib = 498394811; + $daosVersion = 'daosVersion-1809382982'; + $network = 'network1843485230'; + $reservedIpRange = 'reservedIpRange-1082940580'; + $effectiveReservedIpRange = 'effectiveReservedIpRange-598066492'; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setCapacityGib($capacityGib); + $expectedResponse->setDaosVersion($daosVersion); + $expectedResponse->setNetwork($network); + $expectedResponse->setReservedIpRange($reservedIpRange); + $expectedResponse->setEffectiveReservedIpRange($effectiveReservedIpRange); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new GetInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->getInstance($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.parallelstore.v1.Parallelstore/GetInstance', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getInstanceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new GetInstanceRequest()) + ->setName($formattedName); + try { + $gapicClient->getInstance($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importDataTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importDataTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new ImportDataResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/importDataTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new ImportDataRequest()) + ->setName($formattedName); + $response = $gapicClient->importData($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.parallelstore.v1.Parallelstore/ImportData', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importDataTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function importDataExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importDataTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new ImportDataRequest()) + ->setName($formattedName); + $response = $gapicClient->importData($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importDataTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function listInstancesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $instancesElement = new Instance(); + $instances = [ + $instancesElement, + ]; + $expectedResponse = new ListInstancesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setInstances($instances); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListInstancesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listInstances($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getInstances()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.parallelstore.v1.Parallelstore/ListInstances', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listInstancesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListInstancesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listInstances($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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'; + $capacityGib = 498394811; + $daosVersion = 'daosVersion-1809382982'; + $network = 'network1843485230'; + $reservedIpRange = 'reservedIpRange-1082940580'; + $effectiveReservedIpRange = 'effectiveReservedIpRange-598066492'; + $expectedResponse = new Instance(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setCapacityGib($capacityGib); + $expectedResponse->setDaosVersion($daosVersion); + $expectedResponse->setNetwork($network); + $expectedResponse->setReservedIpRange($reservedIpRange); + $expectedResponse->setEffectiveReservedIpRange($effectiveReservedIpRange); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $instance = new Instance(); + $instanceCapacityGib = 1813257007; + $instance->setCapacityGib($instanceCapacityGib); + $request = (new UpdateInstanceRequest()) + ->setUpdateMask($updateMask) + ->setInstance($instance); + $response = $gapicClient->updateInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.parallelstore.v1.Parallelstore/UpdateInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getInstance(); + $this->assertProtobufEquals($instance, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateInstanceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateInstanceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $instance = new Instance(); + $instanceCapacityGib = 1813257007; + $instance->setCapacityGib($instanceCapacityGib); + $request = (new UpdateInstanceRequest()) + ->setUpdateMask($updateMask) + ->setInstance($instance); + $response = $gapicClient->updateInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateInstanceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createInstanceAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->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'; + $capacityGib = 498394811; + $daosVersion = 'daosVersion-1809382982'; + $network = 'network1843485230'; + $reservedIpRange = 'reservedIpRange-1082940580'; + $effectiveReservedIpRange = 'effectiveReservedIpRange-598066492'; + $expectedResponse = new Instance(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setCapacityGib($capacityGib); + $expectedResponse->setDaosVersion($daosVersion); + $expectedResponse->setNetwork($network); + $expectedResponse->setReservedIpRange($reservedIpRange); + $expectedResponse->setEffectiveReservedIpRange($effectiveReservedIpRange); + $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(); + $instanceCapacityGib = 1813257007; + $instance->setCapacityGib($instanceCapacityGib); + $request = (new CreateInstanceRequest()) + ->setParent($formattedParent) + ->setInstanceId($instanceId) + ->setInstance($instance); + $response = $gapicClient->createInstanceAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.parallelstore.v1.Parallelstore/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()); + } +} diff --git a/owl-bot-staging/Parallelstore/v1beta/proto/src/GPBMetadata/Google/Cloud/Parallelstore/V1Beta/Parallelstore.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/GPBMetadata/Google/Cloud/Parallelstore/V1Beta/Parallelstore.php new file mode 100644 index 0000000000000000000000000000000000000000..33dd88ecf03ccdeaeac6a1a3ca83c87592d615d5 GIT binary patch literal 8766 zcmeGi&2Jl7eaF+J?#uVvq;=EncItF#8d_UTciENGEQ~*rnoSeqxK#@lW^BJWLnbrB z%sAa_6^UKM1##objoTjKe*me{3JHWj?d*b)rn>U_uoMh5)L86yV-h02_ z`+a{s-~Xn)ZKFA5m6*iQJknO0`--pt7REVv%9rL9HnLL+PXoUjG`1bl=Y38 zQYw~f*8$YEx=xGal#XR}43cdbR=1tCHAgcHVz{2=knG;wCh@fBVusy-kg4qw*VbA@ zS*_$B!m+mIY4ufxtX`nV>Xk6E`s2HKIJJaO%g|g`iEN_hNP&NLw`u4t#q~4~{=1>O z4c*i|T{HAgfWu{FOEX*o7!IG^>Y6Q2w@ifsY?v)Fe@o#w>De2$1rk|S1bG!IBoI)& zYE?1ho_Z*b0xTFhF}>5ltmwpO=gGFVr(4czfR@cI z>vUjM;#*&A-qtL$<8)0^H#_wWo7(*8WD}?y1YX*;z5VzE2cS$&4>fn^HDGHxxQnOl z+Jj-4h2Hs4_w7+_w*&KA0r#B`42GJ|P4v$t^xkXvExyjdGR)mG5qHmUcb~oFW7cdP zq5?H1?(?(PLK|DuW*SZ3X#4|L4js_JH2lrWp-sovzrQu-Zy7x$XRScVeaKn-0q4yU zsz!fPM6qC#)3*!C@=pljgA<<62tSbicM>JbCg=#F2cAObXn;#eiZp*AFTYZgIE6;q zev|;yOC`jPgiC0Mh69q4VQqZzZicgSjEpnlqRb`*q!-BeT{O~i2>jWgq@~UQvXRAE zflSby2`njq>e>){eW;;$P-|$|(3%kEQ^Sf3*Ss&TIod9IG_NtplIc17lm-dEg+^N% zZ*=r#DhWi$`QcaU&?_~8FQd`6X1R?$;>o#l)Y~M{G zpvK?Jq4Os3o>|ULYJ@@DV)&%5R0X|F(^}UfKGk5UZU&aJ>l^?V(G-{%arQ{Nq1z2d zGdmRW!8)&fIW4NHwHkkUe6gCIHL$ z;$jT>(?GDvK-VZF7k#~sF1B?Ch_syjDCS9qIgVzF0>L5l8)%|UY{S~$g)q?Y_HB}y zVrb(Sc`<;j0U)Dy_6`~enGYU8@($VOZidIu(4J;=3HPmB;sYtIp&{lWcm_>v*3??5 z@o0UsQYw^J%BAAu8+a5Y3)PZZE3dCkN*JMGwNNWRE=?xrPO-FBVmmV3Sy9Vt0CNtm zx$vm6T2+e_Xef8^rTPhaCmIR40|#a$ycOREFZ?0M+RZ-qzYem7)#Ax0`&@h;WOYA~ zz(MhOuy8?qx{FEinf|qerq^`WD+`D!`B4{A1ztwOKop4G4?=gqm%dW#H*ri_FQN;! z)&XmS;)zLgh+E7hgxI=g?GTfNEaq?$eiIFYc|t+NLXW>VgOZlhCQhTdpQ5paFQ)T)rN|xCQ(85}Gi{$6g~uBMY@a-bmMk_}JRkng)%v5Gm5% zL3ot}vJ;|PibQWAxR^>#e*wG|SRfWe3A|@j38WCA_lDl?rH};9qrf7VN=_#nUWdWpp+97KK!CEu~au_Czd8opV(bAQzQoQ zNI$J-Qfi-YddWNe;{=)t3QEz(^ygw)1`HBRUoO6jlEiHD^vwlxV)_QB^E3zAjh-jU zwEBQ#+3e|1##hidtueZ81L{Z@{JQ6jGM+;hea%C@YtaJ6Fj!22>@LkGsn%p#zd%3> zvhaB!aydPRCN^0!xY}~_-PR8A@FbGEj_yYuYF+7hG!0FXr<)A%@h9Kp=prp1Wy;pP z?H*1keFvpNI8QwOsf?z|ySC+cMd&q!Q*NLs-b^$)Ew|BR^fT8QiIr9RIDha4{sFoS zg`VIP0#T?X_MLMnMnpS`vj-ABn<-x#;O8SyhW+j5zyEVGk(3~qOwig#Z;=L6S5_BN z2oK#*K|%R6hpy||Zhz^t$stq@kWZpvF4g=Pt9ykw(o_khkNcJI7)|?1h>DAQ!8c-v zi|Zj`1E7niP~C)d5z;UX8S(1YkRk%J{U2AtG{Rv=;HfwL*F<c z$NKv*G*g4}*@aosiBU3U$O}hFuEkSC$sn!uqGV8(42qI80J6+-T$H4-aB!5QoeT$0 zgUrKrACh@*`TsJfnd!eL^WU9Amyb5T?;R0zs5(a$Uo+^iWC@X{HYlx7b9k+^BCvk{ z$aqG(;@6L79KVFgak&ezE6$R;#5LbWNtRcjqxUo7y;B5|0!>K(%CO;&(3s~(7~Wt~ z^BG^vo&uq0FXf}t)-NSADJ)6c4^8Em)nxr#V+&|%v!E!`PNTW+5!YX&VNIrei8$-- z=(bJTjB}YH;itti4N)?_h{nbFmSyX3oW>~`Poq(O++U^K$_phlDyXB(;HzNwRds!H zrBrRyo>uzXUT9~_4=Wqh8gF__PuO>2;b#(>=o=H@>*(qVbiR$vTD1&_)=G~{Ykghx zWi)g6$iwnFV1FCU9^T5UYwCIdnrS-R83d|6nUoiP1)c4n$pZcwN*Bx3QlYj{eR>>O zaQ6}CIBj$2+7bI90*^t$s9Zqh4@>K{LDC;V=Qj&gwN`il0vboC zQmSs2H*0WuGO_r@C>o1YG5EI<8jJMGIL=Ha0^!%XvmeB8iatO;Pvu{#{y5>YKmPp} ziF^32c-?sp6&p+$mV?p8LTIG15E^CR-$-aA)NSMUVo(!0FPJ#ZI3WG4mnxgY9-^9# zXOEycG<{h(!2giYc(k3zal{w}5wu?wEQdzbnV>LAe=5CDuZG9S!Ir2DUaD8Pyl?CN zz$f^CuAOnYoIbs7a>4ij{|oqycKfmTje^AF_a`yU_9ysKUE08|8(13}L=ZZ)*B}ptrc3Xps0`05>xsVdG_ z7)v(KJA>)Xs~U2mH|#NV-D zfU{*eyZO(~p?BbE<7CC>aU|_j=o@!M`tC>ERK$}MJd$**=!xq3tSj$t)5BkMmP!4%&Af?@yDBN2*sn)e4FbV!FjIA@>pkAtknABhMo`JW8; z$)gqg?f~@uyvCot0M5Pv&Ovh+pgil|&EO^YHvgeP=ywTpK&ZC{{3d~& literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/CreateInstanceRequest.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/CreateInstanceRequest.php new file mode 100644 index 000000000000..fe29cbe5c787 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/CreateInstanceRequest.php @@ -0,0 +1,273 @@ +google.cloud.parallelstore.v1beta.CreateInstanceRequest + */ +class CreateInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The instance's project and location, in the format + * `projects/{project}/locations/{location}`. + * Locations map to Google Cloud 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 Parallelstore instance. + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project / location + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance_id = ''; + /** + * Required. The instance to create. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The instance's project and location, in the format + * `projects/{project}/locations/{location}`. + * Locations map to Google Cloud zones; for example, `us-west1-b`. Please see + * {@see ParallelstoreClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Parallelstore\V1beta\Instance $instance Required. The instance to create. + * @param string $instanceId Required. The name of the Parallelstore instance. + * + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project / location + * + * @return \Google\Cloud\Parallelstore\V1beta\CreateInstanceRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Parallelstore\V1beta\Instance $instance, string $instanceId): self + { + return (new self()) + ->setParent($parent) + ->setInstance($instance) + ->setInstanceId($instanceId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The instance's project and location, in the format + * `projects/{project}/locations/{location}`. + * Locations map to Google Cloud zones; for example, `us-west1-b`. + * @type string $instance_id + * Required. The name of the Parallelstore instance. + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project / location + * @type \Google\Cloud\Parallelstore\V1beta\Instance $instance + * Required. The instance to create. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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\Parallelstore\V1Beta\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The instance's project and location, in the format + * `projects/{project}/locations/{location}`. + * Locations map to Google Cloud 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}/locations/{location}`. + * Locations map to Google Cloud 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 Parallelstore instance. + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project / 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 Parallelstore instance. + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project / 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. The instance to create. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Parallelstore\V1beta\Instance|null + */ + public function getInstance() + { + return $this->instance; + } + + public function hasInstance() + { + return isset($this->instance); + } + + public function clearInstance() + { + unset($this->instance); + } + + /** + * Required. The instance to create. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Parallelstore\V1beta\Instance $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1beta\Instance::class); + $this->instance = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 [(.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/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/DeleteInstanceRequest.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/DeleteInstanceRequest.php new file mode 100644 index 000000000000..a4a8255bf2da --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/DeleteInstanceRequest.php @@ -0,0 +1,155 @@ +google.cloud.parallelstore.v1beta.DeleteInstanceRequest + */ +class DeleteInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and 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 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the resource + * Please see {@see ParallelstoreClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\Parallelstore\V1beta\DeleteInstanceRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the resource + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and 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\Parallelstore\V1Beta\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the resource + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and 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 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and 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 [(.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/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/DeploymentType.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/DeploymentType.php new file mode 100644 index 000000000000..26ed91f54fcd --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/DeploymentType.php @@ -0,0 +1,62 @@ +google.cloud.parallelstore.v1beta.DeploymentType + */ +class DeploymentType +{ + /** + * Default Deployment Type + * It is equivalent to SCRATCH + * + * Generated from protobuf enum DEPLOYMENT_TYPE_UNSPECIFIED = 0; + */ + const DEPLOYMENT_TYPE_UNSPECIFIED = 0; + /** + * Scratch + * + * Generated from protobuf enum SCRATCH = 1; + */ + const SCRATCH = 1; + /** + * Persistent + * + * Generated from protobuf enum PERSISTENT = 2; + */ + const PERSISTENT = 2; + + private static $valueToName = [ + self::DEPLOYMENT_TYPE_UNSPECIFIED => 'DEPLOYMENT_TYPE_UNSPECIFIED', + self::SCRATCH => 'SCRATCH', + self::PERSISTENT => 'PERSISTENT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __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/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/DestinationGcsBucket.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/DestinationGcsBucket.php new file mode 100644 index 000000000000..8e7de4c6a1ef --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/DestinationGcsBucket.php @@ -0,0 +1,75 @@ +google.cloud.parallelstore.v1beta.DestinationGcsBucket + */ +class DestinationGcsBucket extends \Google\Protobuf\Internal\Message +{ + /** + * Required. URI to a Cloud Storage bucket in the format: + * `gs:///`. The path inside the bucket is + * optional. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * Required. URI to a Cloud Storage bucket in the format: + * `gs:///`. The path inside the bucket is + * optional. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Parallelstore\V1Beta\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * Required. URI to a Cloud Storage bucket in the format: + * `gs:///`. The path inside the bucket is + * optional. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Required. URI to a Cloud Storage bucket in the format: + * `gs:///`. The path inside the bucket is + * optional. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/DestinationParallelstore.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/DestinationParallelstore.php new file mode 100644 index 000000000000..8c0d829fa41e --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/DestinationParallelstore.php @@ -0,0 +1,71 @@ +google.cloud.parallelstore.v1beta.DestinationParallelstore + */ +class DestinationParallelstore extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Root directory path to the Paralellstore filesystem, starting + * with `/`. Defaults to `/` if unset. + * + * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $path = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $path + * Optional. Root directory path to the Paralellstore filesystem, starting + * with `/`. Defaults to `/` if unset. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Parallelstore\V1Beta\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Root directory path to the Paralellstore filesystem, starting + * with `/`. Defaults to `/` if unset. + * + * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * Optional. Root directory path to the Paralellstore filesystem, starting + * with `/`. Defaults to `/` if unset. + * + * Generated from protobuf field string path = 1 [(.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/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/DirectoryStripeLevel.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/DirectoryStripeLevel.php new file mode 100644 index 000000000000..335a8d65009b --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/DirectoryStripeLevel.php @@ -0,0 +1,68 @@ +google.cloud.parallelstore.v1beta.DirectoryStripeLevel + */ +class DirectoryStripeLevel +{ + /** + * If not set, DirectoryStripeLevel will default to DIRECTORY_STRIPE_LEVEL_MAX + * + * Generated from protobuf enum DIRECTORY_STRIPE_LEVEL_UNSPECIFIED = 0; + */ + const DIRECTORY_STRIPE_LEVEL_UNSPECIFIED = 0; + /** + * Minimum directory striping + * + * Generated from protobuf enum DIRECTORY_STRIPE_LEVEL_MIN = 1; + */ + const DIRECTORY_STRIPE_LEVEL_MIN = 1; + /** + * Medium directory striping + * + * Generated from protobuf enum DIRECTORY_STRIPE_LEVEL_BALANCED = 2; + */ + const DIRECTORY_STRIPE_LEVEL_BALANCED = 2; + /** + * Maximum directory striping + * + * Generated from protobuf enum DIRECTORY_STRIPE_LEVEL_MAX = 3; + */ + const DIRECTORY_STRIPE_LEVEL_MAX = 3; + + private static $valueToName = [ + self::DIRECTORY_STRIPE_LEVEL_UNSPECIFIED => 'DIRECTORY_STRIPE_LEVEL_UNSPECIFIED', + self::DIRECTORY_STRIPE_LEVEL_MIN => 'DIRECTORY_STRIPE_LEVEL_MIN', + self::DIRECTORY_STRIPE_LEVEL_BALANCED => 'DIRECTORY_STRIPE_LEVEL_BALANCED', + self::DIRECTORY_STRIPE_LEVEL_MAX => 'DIRECTORY_STRIPE_LEVEL_MAX', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __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/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ExportDataMetadata.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ExportDataMetadata.php new file mode 100644 index 000000000000..22a6f8b50cf3 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ExportDataMetadata.php @@ -0,0 +1,351 @@ +google.cloud.parallelstore.v1beta.ExportDataMetadata + */ +class ExportDataMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Data transfer operation metadata. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.TransferOperationMetadata operation_metadata = 1; + */ + protected $operation_metadata = null; + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.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 = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target = ''; + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 5 [(.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 = 6 [(.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 = 7 [(.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 = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $api_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Parallelstore\V1beta\TransferOperationMetadata $operation_metadata + * Data transfer operation metadata. + * @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\Parallelstore\V1Beta\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * Data transfer operation metadata. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.TransferOperationMetadata operation_metadata = 1; + * @return \Google\Cloud\Parallelstore\V1beta\TransferOperationMetadata|null + */ + public function getOperationMetadata() + { + return $this->operation_metadata; + } + + public function hasOperationMetadata() + { + return isset($this->operation_metadata); + } + + public function clearOperationMetadata() + { + unset($this->operation_metadata); + } + + /** + * Data transfer operation metadata. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.TransferOperationMetadata operation_metadata = 1; + * @param \Google\Cloud\Parallelstore\V1beta\TransferOperationMetadata $var + * @return $this + */ + public function setOperationMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1beta\TransferOperationMetadata::class); + $this->operation_metadata = $var; + + return $this; + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.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 = 3 [(.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 = 4 [(.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 = 4 [(.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 = 5 [(.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 = 5 [(.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 = 6 [(.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 = 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. 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 = 7 [(.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 = 7 [(.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 = 8 [(.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 = 8 [(.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/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ExportDataRequest.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ExportDataRequest.php new file mode 100644 index 000000000000..b5b2af48db2a --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ExportDataRequest.php @@ -0,0 +1,287 @@ +google.cloud.parallelstore.v1beta.ExportDataRequest + */ +class ExportDataRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes 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 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + /** + * Optional. User-specified Service Account (SA) credentials to be used when + * performing the transfer. + * Use one of the following formats: + * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * If unspecified, the Parallelstore service agent is used: + * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` + * + * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $service_account = ''; + protected $source; + protected $destination; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Parallelstore\V1beta\SourceParallelstore $source_parallelstore + * Parallelstore source. + * @type \Google\Cloud\Parallelstore\V1beta\DestinationGcsBucket $destination_gcs_bucket + * Cloud Storage destination. + * @type string $name + * Required. Name of the resource. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes 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 string $service_account + * Optional. User-specified Service Account (SA) credentials to be used when + * performing the transfer. + * Use one of the following formats: + * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * If unspecified, the Parallelstore service agent is used: + * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Parallelstore\V1Beta\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * Parallelstore source. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.SourceParallelstore source_parallelstore = 2; + * @return \Google\Cloud\Parallelstore\V1beta\SourceParallelstore|null + */ + public function getSourceParallelstore() + { + return $this->readOneof(2); + } + + public function hasSourceParallelstore() + { + return $this->hasOneof(2); + } + + /** + * Parallelstore source. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.SourceParallelstore source_parallelstore = 2; + * @param \Google\Cloud\Parallelstore\V1beta\SourceParallelstore $var + * @return $this + */ + public function setSourceParallelstore($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1beta\SourceParallelstore::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Cloud Storage destination. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.DestinationGcsBucket destination_gcs_bucket = 3; + * @return \Google\Cloud\Parallelstore\V1beta\DestinationGcsBucket|null + */ + public function getDestinationGcsBucket() + { + return $this->readOneof(3); + } + + public function hasDestinationGcsBucket() + { + return $this->hasOneof(3); + } + + /** + * Cloud Storage destination. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.DestinationGcsBucket destination_gcs_bucket = 3; + * @param \Google\Cloud\Parallelstore\V1beta\DestinationGcsBucket $var + * @return $this + */ + public function setDestinationGcsBucket($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1beta\DestinationGcsBucket::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes 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 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server 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 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. User-specified Service Account (SA) credentials to be used when + * performing the transfer. + * Use one of the following formats: + * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * If unspecified, the Parallelstore service agent is used: + * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` + * + * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * Optional. User-specified Service Account (SA) credentials to be used when + * performing the transfer. + * Use one of the following formats: + * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * If unspecified, the Parallelstore service agent is used: + * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` + * + * Generated from protobuf field string service_account = 5 [(.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; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ExportDataResponse.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ExportDataResponse.php new file mode 100644 index 000000000000..53ef6c9be2dc --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ExportDataResponse.php @@ -0,0 +1,33 @@ +google.cloud.parallelstore.v1beta.ExportDataResponse + */ +class ExportDataResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Parallelstore\V1Beta\Parallelstore::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/FileStripeLevel.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/FileStripeLevel.php new file mode 100644 index 000000000000..9b2e95057541 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/FileStripeLevel.php @@ -0,0 +1,68 @@ +google.cloud.parallelstore.v1beta.FileStripeLevel + */ +class FileStripeLevel +{ + /** + * If not set, FileStripeLevel will default to FILE_STRIPE_LEVEL_BALANCED + * + * Generated from protobuf enum FILE_STRIPE_LEVEL_UNSPECIFIED = 0; + */ + const FILE_STRIPE_LEVEL_UNSPECIFIED = 0; + /** + * Minimum file striping + * + * Generated from protobuf enum FILE_STRIPE_LEVEL_MIN = 1; + */ + const FILE_STRIPE_LEVEL_MIN = 1; + /** + * Medium file striping + * + * Generated from protobuf enum FILE_STRIPE_LEVEL_BALANCED = 2; + */ + const FILE_STRIPE_LEVEL_BALANCED = 2; + /** + * Maximum file striping + * + * Generated from protobuf enum FILE_STRIPE_LEVEL_MAX = 3; + */ + const FILE_STRIPE_LEVEL_MAX = 3; + + private static $valueToName = [ + self::FILE_STRIPE_LEVEL_UNSPECIFIED => 'FILE_STRIPE_LEVEL_UNSPECIFIED', + self::FILE_STRIPE_LEVEL_MIN => 'FILE_STRIPE_LEVEL_MIN', + self::FILE_STRIPE_LEVEL_BALANCED => 'FILE_STRIPE_LEVEL_BALANCED', + self::FILE_STRIPE_LEVEL_MAX => 'FILE_STRIPE_LEVEL_MAX', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __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/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/GetInstanceRequest.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/GetInstanceRequest.php new file mode 100644 index 000000000000..fd795fcc0f6b --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/GetInstanceRequest.php @@ -0,0 +1,86 @@ +google.cloud.parallelstore.v1beta.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 = ''; + + /** + * @param string $name Required. The instance resource name, in the format + * `projects/{project_id}/locations/{location}/instances/{instance_id}`. Please see + * {@see ParallelstoreClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\Parallelstore\V1beta\GetInstanceRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The instance resource name, in the format + * `projects/{project_id}/locations/{location}/instances/{instance_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Parallelstore\V1Beta\Parallelstore::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/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ImportDataMetadata.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ImportDataMetadata.php new file mode 100644 index 000000000000..3c3cfac406bb --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ImportDataMetadata.php @@ -0,0 +1,351 @@ +google.cloud.parallelstore.v1beta.ImportDataMetadata + */ +class ImportDataMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Data transfer operation metadata. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.TransferOperationMetadata operation_metadata = 1; + */ + protected $operation_metadata = null; + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.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 = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target = ''; + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 5 [(.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 = 6 [(.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 = 7 [(.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 = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $api_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Parallelstore\V1beta\TransferOperationMetadata $operation_metadata + * Data transfer operation metadata. + * @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\Parallelstore\V1Beta\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * Data transfer operation metadata. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.TransferOperationMetadata operation_metadata = 1; + * @return \Google\Cloud\Parallelstore\V1beta\TransferOperationMetadata|null + */ + public function getOperationMetadata() + { + return $this->operation_metadata; + } + + public function hasOperationMetadata() + { + return isset($this->operation_metadata); + } + + public function clearOperationMetadata() + { + unset($this->operation_metadata); + } + + /** + * Data transfer operation metadata. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.TransferOperationMetadata operation_metadata = 1; + * @param \Google\Cloud\Parallelstore\V1beta\TransferOperationMetadata $var + * @return $this + */ + public function setOperationMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1beta\TransferOperationMetadata::class); + $this->operation_metadata = $var; + + return $this; + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.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 = 3 [(.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 = 4 [(.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 = 4 [(.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 = 5 [(.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 = 5 [(.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 = 6 [(.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 = 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. 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 = 7 [(.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 = 7 [(.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 = 8 [(.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 = 8 [(.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/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ImportDataRequest.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ImportDataRequest.php new file mode 100644 index 000000000000..7c2e0471a0dc --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ImportDataRequest.php @@ -0,0 +1,287 @@ +google.cloud.parallelstore.v1beta.ImportDataRequest + */ +class ImportDataRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes 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 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + /** + * Optional. User-specified service account credentials to be used when + * performing the transfer. + * Use one of the following formats: + * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * If unspecified, the Parallelstore service agent is used: + * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` + * + * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $service_account = ''; + protected $source; + protected $destination; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Parallelstore\V1beta\SourceGcsBucket $source_gcs_bucket + * The Cloud Storage source bucket and, optionally, path inside the bucket. + * @type \Google\Cloud\Parallelstore\V1beta\DestinationParallelstore $destination_parallelstore + * Parallelstore destination. + * @type string $name + * Required. Name of the resource. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes 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 string $service_account + * Optional. User-specified service account credentials to be used when + * performing the transfer. + * Use one of the following formats: + * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * If unspecified, the Parallelstore service agent is used: + * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Parallelstore\V1Beta\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * The Cloud Storage source bucket and, optionally, path inside the bucket. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.SourceGcsBucket source_gcs_bucket = 2; + * @return \Google\Cloud\Parallelstore\V1beta\SourceGcsBucket|null + */ + public function getSourceGcsBucket() + { + return $this->readOneof(2); + } + + public function hasSourceGcsBucket() + { + return $this->hasOneof(2); + } + + /** + * The Cloud Storage source bucket and, optionally, path inside the bucket. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.SourceGcsBucket source_gcs_bucket = 2; + * @param \Google\Cloud\Parallelstore\V1beta\SourceGcsBucket $var + * @return $this + */ + public function setSourceGcsBucket($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1beta\SourceGcsBucket::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Parallelstore destination. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.DestinationParallelstore destination_parallelstore = 3; + * @return \Google\Cloud\Parallelstore\V1beta\DestinationParallelstore|null + */ + public function getDestinationParallelstore() + { + return $this->readOneof(3); + } + + public function hasDestinationParallelstore() + { + return $this->hasOneof(3); + } + + /** + * Parallelstore destination. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.DestinationParallelstore destination_parallelstore = 3; + * @param \Google\Cloud\Parallelstore\V1beta\DestinationParallelstore $var + * @return $this + */ + public function setDestinationParallelstore($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1beta\DestinationParallelstore::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes 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 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server 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 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. User-specified service account credentials to be used when + * performing the transfer. + * Use one of the following formats: + * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * If unspecified, the Parallelstore service agent is used: + * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` + * + * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * Optional. User-specified service account credentials to be used when + * performing the transfer. + * Use one of the following formats: + * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` + * If unspecified, the Parallelstore service agent is used: + * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` + * + * Generated from protobuf field string service_account = 5 [(.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; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ImportDataResponse.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ImportDataResponse.php new file mode 100644 index 000000000000..9eb5207960b1 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ImportDataResponse.php @@ -0,0 +1,33 @@ +google.cloud.parallelstore.v1beta.ImportDataResponse + */ +class ImportDataResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Parallelstore\V1Beta\Parallelstore::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/Instance.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/Instance.php new file mode 100644 index 000000000000..f7bf0900d608 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/Instance.php @@ -0,0 +1,667 @@ +google.cloud.parallelstore.v1beta.Instance + */ +class Instance extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the instance, in the format + * `projects/{project}/locations/{location}/instances/{instance_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Optional. The description of the instance. 2048 characters or less. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. The instance state. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.Instance.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The time when the instance 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 when the instance was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Cloud Labels are a flexible and lightweight mechanism for + * organizing cloud resources into groups that reflect a customer's + * organizational needs and deployment strategies. See + * https://cloud.google.com/resource-manager/docs/labels-overview for details. + * + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Required. Immutable. The instance's storage capacity in Gibibytes (GiB). + * Allowed values are between 12000 and 100000, in multiples of 4000; e.g., + * 12000, 16000, 20000, ... + * + * Generated from protobuf field int64 capacity_gib = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + */ + protected $capacity_gib = 0; + /** + * Output only. The version of DAOS software running in the instance. + * + * Generated from protobuf field string daos_version = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $daos_version = ''; + /** + * Output only. A list of IPv4 addresses used for client side configuration. + * + * Generated from protobuf field repeated string access_points = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $access_points; + /** + * Optional. Immutable. The name of the Compute Engine + * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the + * instance is connected. + * + * Generated from protobuf field string network = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $network = ''; + /** + * Optional. Immutable. The ID of the IP address range being used by the + * instance's VPC network. See [Configure a VPC + * network](https://cloud.google.com/parallelstore/docs/vpc#create_and_configure_the_vpc). + * If no ID is provided, all ranges are considered. + * + * Generated from protobuf field string reserved_ip_range = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $reserved_ip_range = ''; + /** + * Output only. Immutable. The ID of the IP address range being used by the + * instance's VPC network. This field is populated by the service and contains + * the value currently used by the service. + * + * Generated from protobuf field string effective_reserved_ip_range = 14 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $effective_reserved_ip_range = ''; + /** + * Optional. Stripe level for files. Allowed values are: + * * `FILE_STRIPE_LEVEL_MIN`: offers the best performance for small size + * files. + * * `FILE_STRIPE_LEVEL_BALANCED`: balances performance for workloads + * involving a mix of small and large files. + * * `FILE_STRIPE_LEVEL_MAX`: higher throughput performance for larger files. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.FileStripeLevel file_stripe_level = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $file_stripe_level = 0; + /** + * Optional. Stripe level for directories. Allowed values are: + * * `DIRECTORY_STRIPE_LEVEL_MIN`: recommended when directories contain a + * small number of files. + * * `DIRECTORY_STRIPE_LEVEL_BALANCED`: balances performance for workloads + * involving a mix of small and large directories. + * * `DIRECTORY_STRIPE_LEVEL_MAX`: recommended for directories with a large + * number of files. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.DirectoryStripeLevel directory_stripe_level = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $directory_stripe_level = 0; + /** + * Optional. The deployment type of the instance. Allowed values are: + * * `SCRATCH`: the instance is a scratch instance. + * * `PERSISTENT`: the instance is a persistent instance. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.DeploymentType deployment_type = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $deployment_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the instance, in the format + * `projects/{project}/locations/{location}/instances/{instance_id}`. + * @type string $description + * Optional. The description of the instance. 2048 characters or less. + * @type int $state + * Output only. The instance state. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time when the instance was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time when the instance was updated. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Cloud Labels are a flexible and lightweight mechanism for + * organizing cloud resources into groups that reflect a customer's + * organizational needs and deployment strategies. See + * https://cloud.google.com/resource-manager/docs/labels-overview for details. + * @type int|string $capacity_gib + * Required. Immutable. The instance's storage capacity in Gibibytes (GiB). + * Allowed values are between 12000 and 100000, in multiples of 4000; e.g., + * 12000, 16000, 20000, ... + * @type string $daos_version + * Output only. The version of DAOS software running in the instance. + * @type array|\Google\Protobuf\Internal\RepeatedField $access_points + * Output only. A list of IPv4 addresses used for client side configuration. + * @type string $network + * Optional. Immutable. The name of the Compute Engine + * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the + * instance is connected. + * @type string $reserved_ip_range + * Optional. Immutable. The ID of the IP address range being used by the + * instance's VPC network. See [Configure a VPC + * network](https://cloud.google.com/parallelstore/docs/vpc#create_and_configure_the_vpc). + * If no ID is provided, all ranges are considered. + * @type string $effective_reserved_ip_range + * Output only. Immutable. The ID of the IP address range being used by the + * instance's VPC network. This field is populated by the service and contains + * the value currently used by the service. + * @type int $file_stripe_level + * Optional. Stripe level for files. Allowed values are: + * * `FILE_STRIPE_LEVEL_MIN`: offers the best performance for small size + * files. + * * `FILE_STRIPE_LEVEL_BALANCED`: balances performance for workloads + * involving a mix of small and large files. + * * `FILE_STRIPE_LEVEL_MAX`: higher throughput performance for larger files. + * @type int $directory_stripe_level + * Optional. Stripe level for directories. Allowed values are: + * * `DIRECTORY_STRIPE_LEVEL_MIN`: recommended when directories contain a + * small number of files. + * * `DIRECTORY_STRIPE_LEVEL_BALANCED`: balances performance for workloads + * involving a mix of small and large directories. + * * `DIRECTORY_STRIPE_LEVEL_MAX`: recommended for directories with a large + * number of files. + * @type int $deployment_type + * Optional. The deployment type of the instance. Allowed values are: + * * `SCRATCH`: the instance is a scratch instance. + * * `PERSISTENT`: the instance is a persistent instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Parallelstore\V1Beta\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the instance, in the format + * `projects/{project}/locations/{location}/instances/{instance_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the instance, in the format + * `projects/{project}/locations/{location}/instances/{instance_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The description of the instance. 2048 characters or less. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. The description of the instance. 2048 characters or less. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. The instance state. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.Instance.State state = 3 [(.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.parallelstore.v1beta.Instance.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Parallelstore\V1beta\Instance\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The time when the instance 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 instance 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 when the instance was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The time when the instance was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Optional. Cloud Labels are a flexible and lightweight mechanism for + * organizing cloud resources into groups that reflect a customer's + * organizational needs and deployment strategies. See + * https://cloud.google.com/resource-manager/docs/labels-overview for details. + * + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Cloud Labels are a flexible and lightweight mechanism for + * organizing cloud resources into groups that reflect a customer's + * organizational needs and deployment strategies. See + * https://cloud.google.com/resource-manager/docs/labels-overview for details. + * + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Required. Immutable. The instance's storage capacity in Gibibytes (GiB). + * Allowed values are between 12000 and 100000, in multiples of 4000; e.g., + * 12000, 16000, 20000, ... + * + * Generated from protobuf field int64 capacity_gib = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * @return int|string + */ + public function getCapacityGib() + { + return $this->capacity_gib; + } + + /** + * Required. Immutable. The instance's storage capacity in Gibibytes (GiB). + * Allowed values are between 12000 and 100000, in multiples of 4000; e.g., + * 12000, 16000, 20000, ... + * + * Generated from protobuf field int64 capacity_gib = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * @param int|string $var + * @return $this + */ + public function setCapacityGib($var) + { + GPBUtil::checkInt64($var); + $this->capacity_gib = $var; + + return $this; + } + + /** + * Output only. The version of DAOS software running in the instance. + * + * Generated from protobuf field string daos_version = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDaosVersion() + { + return $this->daos_version; + } + + /** + * Output only. The version of DAOS software running in the instance. + * + * Generated from protobuf field string daos_version = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDaosVersion($var) + { + GPBUtil::checkString($var, True); + $this->daos_version = $var; + + return $this; + } + + /** + * Output only. A list of IPv4 addresses used for client side configuration. + * + * Generated from protobuf field repeated string access_points = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAccessPoints() + { + return $this->access_points; + } + + /** + * Output only. A list of IPv4 addresses used for client side configuration. + * + * Generated from protobuf field repeated string access_points = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAccessPoints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->access_points = $arr; + + return $this; + } + + /** + * Optional. Immutable. The name of the Compute Engine + * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the + * instance is connected. + * + * Generated from protobuf field string network = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * Optional. Immutable. The name of the Compute Engine + * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the + * instance is connected. + * + * Generated from protobuf field string network = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * Optional. Immutable. The ID of the IP address range being used by the + * instance's VPC network. See [Configure a VPC + * network](https://cloud.google.com/parallelstore/docs/vpc#create_and_configure_the_vpc). + * If no ID is provided, all ranges are considered. + * + * Generated from protobuf field string reserved_ip_range = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getReservedIpRange() + { + return $this->reserved_ip_range; + } + + /** + * Optional. Immutable. The ID of the IP address range being used by the + * instance's VPC network. See [Configure a VPC + * network](https://cloud.google.com/parallelstore/docs/vpc#create_and_configure_the_vpc). + * If no ID is provided, all ranges are considered. + * + * Generated from protobuf field string reserved_ip_range = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setReservedIpRange($var) + { + GPBUtil::checkString($var, True); + $this->reserved_ip_range = $var; + + return $this; + } + + /** + * Output only. Immutable. The ID of the IP address range being used by the + * instance's VPC network. This field is populated by the service and contains + * the value currently used by the service. + * + * Generated from protobuf field string effective_reserved_ip_range = 14 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getEffectiveReservedIpRange() + { + return $this->effective_reserved_ip_range; + } + + /** + * Output only. Immutable. The ID of the IP address range being used by the + * instance's VPC network. This field is populated by the service and contains + * the value currently used by the service. + * + * Generated from protobuf field string effective_reserved_ip_range = 14 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setEffectiveReservedIpRange($var) + { + GPBUtil::checkString($var, True); + $this->effective_reserved_ip_range = $var; + + return $this; + } + + /** + * Optional. Stripe level for files. Allowed values are: + * * `FILE_STRIPE_LEVEL_MIN`: offers the best performance for small size + * files. + * * `FILE_STRIPE_LEVEL_BALANCED`: balances performance for workloads + * involving a mix of small and large files. + * * `FILE_STRIPE_LEVEL_MAX`: higher throughput performance for larger files. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.FileStripeLevel file_stripe_level = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getFileStripeLevel() + { + return $this->file_stripe_level; + } + + /** + * Optional. Stripe level for files. Allowed values are: + * * `FILE_STRIPE_LEVEL_MIN`: offers the best performance for small size + * files. + * * `FILE_STRIPE_LEVEL_BALANCED`: balances performance for workloads + * involving a mix of small and large files. + * * `FILE_STRIPE_LEVEL_MAX`: higher throughput performance for larger files. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.FileStripeLevel file_stripe_level = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setFileStripeLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Parallelstore\V1beta\FileStripeLevel::class); + $this->file_stripe_level = $var; + + return $this; + } + + /** + * Optional. Stripe level for directories. Allowed values are: + * * `DIRECTORY_STRIPE_LEVEL_MIN`: recommended when directories contain a + * small number of files. + * * `DIRECTORY_STRIPE_LEVEL_BALANCED`: balances performance for workloads + * involving a mix of small and large directories. + * * `DIRECTORY_STRIPE_LEVEL_MAX`: recommended for directories with a large + * number of files. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.DirectoryStripeLevel directory_stripe_level = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getDirectoryStripeLevel() + { + return $this->directory_stripe_level; + } + + /** + * Optional. Stripe level for directories. Allowed values are: + * * `DIRECTORY_STRIPE_LEVEL_MIN`: recommended when directories contain a + * small number of files. + * * `DIRECTORY_STRIPE_LEVEL_BALANCED`: balances performance for workloads + * involving a mix of small and large directories. + * * `DIRECTORY_STRIPE_LEVEL_MAX`: recommended for directories with a large + * number of files. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.DirectoryStripeLevel directory_stripe_level = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setDirectoryStripeLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Parallelstore\V1beta\DirectoryStripeLevel::class); + $this->directory_stripe_level = $var; + + return $this; + } + + /** + * Optional. The deployment type of the instance. Allowed values are: + * * `SCRATCH`: the instance is a scratch instance. + * * `PERSISTENT`: the instance is a persistent instance. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.DeploymentType deployment_type = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getDeploymentType() + { + return $this->deployment_type; + } + + /** + * Optional. The deployment type of the instance. Allowed values are: + * * `SCRATCH`: the instance is a scratch instance. + * * `PERSISTENT`: the instance is a persistent instance. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.DeploymentType deployment_type = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setDeploymentType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Parallelstore\V1beta\DeploymentType::class); + $this->deployment_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/Instance/State.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/Instance/State.php new file mode 100644 index 000000000000..354012ed3507 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/Instance/State.php @@ -0,0 +1,85 @@ +google.cloud.parallelstore.v1beta.Instance.State + */ +class 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 ACTIVE = 2; + */ + const ACTIVE = 2; + /** + * The instance is being deleted. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * The instance is not usable. + * + * Generated from protobuf enum FAILED = 4; + */ + const FAILED = 4; + /** + * The instance is being upgraded. + * + * Generated from protobuf enum UPGRADING = 5; + */ + const UPGRADING = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::ACTIVE => 'ACTIVE', + self::DELETING => 'DELETING', + self::FAILED => 'FAILED', + self::UPGRADING => 'UPGRADING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no 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\Parallelstore\V1beta\Instance_State::class); + diff --git a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ListInstancesRequest.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ListInstancesRequest.php new file mode 100644 index 000000000000..7a8b21e383d0 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ListInstancesRequest.php @@ -0,0 +1,237 @@ +google.cloud.parallelstore.v1beta.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}`. + * To retrieve instance information for all locations, use "-" as the value of + * `{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, the server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Filtering results. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The project and location for which to retrieve instance + * information, in the format `projects/{project_id}/locations/{location}`. + * + * To retrieve instance information for all locations, use "-" as the value of + * `{location}`. Please see + * {@see ParallelstoreClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Parallelstore\V1beta\ListInstancesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project and location for which to retrieve instance + * information, in the format `projects/{project_id}/locations/{location}`. + * To retrieve instance information for all locations, use "-" as the value of + * `{location}`. + * @type int $page_size + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, the server will pick an appropriate default. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * @type string $filter + * Optional. Filtering results. + * @type string $order_by + * Optional. Hint for how to order the results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Parallelstore\V1Beta\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location for which to retrieve instance + * information, in the format `projects/{project_id}/locations/{location}`. + * To retrieve instance information for all locations, use "-" as the value of + * `{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project and location for which to retrieve instance + * information, in the format `projects/{project_id}/locations/{location}`. + * To retrieve instance information for all locations, use "-" as the value of + * `{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Requested page size. Server may return fewer items than + * requested. 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. Requested page size. Server may return fewer items than + * requested. If unspecified, the server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Filtering results. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filtering results. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ListInstancesResponse.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ListInstancesResponse.php new file mode 100644 index 000000000000..771809f64967 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ListInstancesResponse.php @@ -0,0 +1,136 @@ +google.cloud.parallelstore.v1beta.ListInstancesResponse + */ +class ListInstancesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Parallelstore instances. + * + * Generated from protobuf field repeated .google.cloud.parallelstore.v1beta.Instance instances = 1; + */ + private $instances; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Parallelstore\V1beta\Instance>|\Google\Protobuf\Internal\RepeatedField $instances + * The list of Parallelstore instances. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Parallelstore\V1Beta\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * The list of Parallelstore instances. + * + * Generated from protobuf field repeated .google.cloud.parallelstore.v1beta.Instance instances = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInstances() + { + return $this->instances; + } + + /** + * The list of Parallelstore instances. + * + * Generated from protobuf field repeated .google.cloud.parallelstore.v1beta.Instance instances = 1; + * @param array<\Google\Cloud\Parallelstore\V1beta\Instance>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInstances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Parallelstore\V1beta\Instance::class); + $this->instances = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/OperationMetadata.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/OperationMetadata.php new file mode 100644 index 000000000000..4c18d216563a --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/OperationMetadata.php @@ -0,0 +1,307 @@ +google.cloud.parallelstore.v1beta.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target = ''; + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $verb = ''; + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status_message = ''; + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been cancelled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $requested_cancellation = false; + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $api_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time the operation finished running. + * @type string $target + * Output only. Server-defined resource path for the target of the operation. + * @type string $verb + * Output only. Name of the verb executed by the operation. + * @type string $status_message + * Output only. Human-readable status of the operation, if any. + * @type bool $requested_cancellation + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been cancelled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * @type string $api_version + * Output only. API version used to start the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Parallelstore\V1Beta\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStatusMessage() + { + return $this->status_message; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStatusMessage($var) + { + GPBUtil::checkString($var, True); + $this->status_message = $var; + + return $this; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been cancelled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRequestedCancellation() + { + return $this->requested_cancellation; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been cancelled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRequestedCancellation($var) + { + GPBUtil::checkBool($var); + $this->requested_cancellation = $var; + + return $this; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setApiVersion($var) + { + GPBUtil::checkString($var, True); + $this->api_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/SourceGcsBucket.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/SourceGcsBucket.php new file mode 100644 index 000000000000..d75c59be5ee4 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/SourceGcsBucket.php @@ -0,0 +1,75 @@ +google.cloud.parallelstore.v1beta.SourceGcsBucket + */ +class SourceGcsBucket extends \Google\Protobuf\Internal\Message +{ + /** + * Required. URI to a Cloud Storage bucket in the format: + * `gs:///`. The path inside the bucket is + * optional. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * Required. URI to a Cloud Storage bucket in the format: + * `gs:///`. The path inside the bucket is + * optional. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Parallelstore\V1Beta\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * Required. URI to a Cloud Storage bucket in the format: + * `gs:///`. The path inside the bucket is + * optional. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Required. URI to a Cloud Storage bucket in the format: + * `gs:///`. The path inside the bucket is + * optional. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/SourceParallelstore.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/SourceParallelstore.php new file mode 100644 index 000000000000..9d009c92d2a9 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/SourceParallelstore.php @@ -0,0 +1,71 @@ +google.cloud.parallelstore.v1beta.SourceParallelstore + */ +class SourceParallelstore extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Root directory path to the Paralellstore filesystem, starting + * with `/`. Defaults to `/` if unset. + * + * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $path = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $path + * Optional. Root directory path to the Paralellstore filesystem, starting + * with `/`. Defaults to `/` if unset. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Parallelstore\V1Beta\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Root directory path to the Paralellstore filesystem, starting + * with `/`. Defaults to `/` if unset. + * + * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * Optional. Root directory path to the Paralellstore filesystem, starting + * with `/`. Defaults to `/` if unset. + * + * Generated from protobuf field string path = 1 [(.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/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/TransferCounters.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/TransferCounters.php new file mode 100644 index 000000000000..1f3c823561c5 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/TransferCounters.php @@ -0,0 +1,261 @@ +google.cloud.parallelstore.v1beta.TransferCounters + */ +class TransferCounters extends \Google\Protobuf\Internal\Message +{ + /** + * Objects found in the data source that are scheduled to be transferred, + * excluding any that are filtered based on object conditions or skipped due + * to sync. + * + * Generated from protobuf field int64 objects_found = 1; + */ + protected $objects_found = 0; + /** + * Bytes found in the data source that are scheduled to be transferred, + * excluding any that are filtered based on object conditions or skipped due + * to sync. + * + * Generated from protobuf field int64 bytes_found = 2; + */ + protected $bytes_found = 0; + /** + * Objects in the data source that are not transferred because they already + * exist in the data destination. + * + * Generated from protobuf field int64 objects_skipped = 3; + */ + protected $objects_skipped = 0; + /** + * Bytes in the data source that are not transferred because they already + * exist in the data destination. + * + * Generated from protobuf field int64 bytes_skipped = 4; + */ + protected $bytes_skipped = 0; + /** + * Objects that are copied to the data destination. + * + * Generated from protobuf field int64 objects_copied = 5; + */ + protected $objects_copied = 0; + /** + * Bytes that are copied to the data destination. + * + * Generated from protobuf field int64 bytes_copied = 6; + */ + protected $bytes_copied = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $objects_found + * Objects found in the data source that are scheduled to be transferred, + * excluding any that are filtered based on object conditions or skipped due + * to sync. + * @type int|string $bytes_found + * Bytes found in the data source that are scheduled to be transferred, + * excluding any that are filtered based on object conditions or skipped due + * to sync. + * @type int|string $objects_skipped + * Objects in the data source that are not transferred because they already + * exist in the data destination. + * @type int|string $bytes_skipped + * Bytes in the data source that are not transferred because they already + * exist in the data destination. + * @type int|string $objects_copied + * Objects that are copied to the data destination. + * @type int|string $bytes_copied + * Bytes that are copied to the data destination. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Parallelstore\V1Beta\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * Objects found in the data source that are scheduled to be transferred, + * excluding any that are filtered based on object conditions or skipped due + * to sync. + * + * Generated from protobuf field int64 objects_found = 1; + * @return int|string + */ + public function getObjectsFound() + { + return $this->objects_found; + } + + /** + * Objects found in the data source that are scheduled to be transferred, + * excluding any that are filtered based on object conditions or skipped due + * to sync. + * + * Generated from protobuf field int64 objects_found = 1; + * @param int|string $var + * @return $this + */ + public function setObjectsFound($var) + { + GPBUtil::checkInt64($var); + $this->objects_found = $var; + + return $this; + } + + /** + * Bytes found in the data source that are scheduled to be transferred, + * excluding any that are filtered based on object conditions or skipped due + * to sync. + * + * Generated from protobuf field int64 bytes_found = 2; + * @return int|string + */ + public function getBytesFound() + { + return $this->bytes_found; + } + + /** + * Bytes found in the data source that are scheduled to be transferred, + * excluding any that are filtered based on object conditions or skipped due + * to sync. + * + * Generated from protobuf field int64 bytes_found = 2; + * @param int|string $var + * @return $this + */ + public function setBytesFound($var) + { + GPBUtil::checkInt64($var); + $this->bytes_found = $var; + + return $this; + } + + /** + * Objects in the data source that are not transferred because they already + * exist in the data destination. + * + * Generated from protobuf field int64 objects_skipped = 3; + * @return int|string + */ + public function getObjectsSkipped() + { + return $this->objects_skipped; + } + + /** + * Objects in the data source that are not transferred because they already + * exist in the data destination. + * + * Generated from protobuf field int64 objects_skipped = 3; + * @param int|string $var + * @return $this + */ + public function setObjectsSkipped($var) + { + GPBUtil::checkInt64($var); + $this->objects_skipped = $var; + + return $this; + } + + /** + * Bytes in the data source that are not transferred because they already + * exist in the data destination. + * + * Generated from protobuf field int64 bytes_skipped = 4; + * @return int|string + */ + public function getBytesSkipped() + { + return $this->bytes_skipped; + } + + /** + * Bytes in the data source that are not transferred because they already + * exist in the data destination. + * + * Generated from protobuf field int64 bytes_skipped = 4; + * @param int|string $var + * @return $this + */ + public function setBytesSkipped($var) + { + GPBUtil::checkInt64($var); + $this->bytes_skipped = $var; + + return $this; + } + + /** + * Objects that are copied to the data destination. + * + * Generated from protobuf field int64 objects_copied = 5; + * @return int|string + */ + public function getObjectsCopied() + { + return $this->objects_copied; + } + + /** + * Objects that are copied to the data destination. + * + * Generated from protobuf field int64 objects_copied = 5; + * @param int|string $var + * @return $this + */ + public function setObjectsCopied($var) + { + GPBUtil::checkInt64($var); + $this->objects_copied = $var; + + return $this; + } + + /** + * Bytes that are copied to the data destination. + * + * Generated from protobuf field int64 bytes_copied = 6; + * @return int|string + */ + public function getBytesCopied() + { + return $this->bytes_copied; + } + + /** + * Bytes that are copied to the data destination. + * + * Generated from protobuf field int64 bytes_copied = 6; + * @param int|string $var + * @return $this + */ + public function setBytesCopied($var) + { + GPBUtil::checkInt64($var); + $this->bytes_copied = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/TransferOperationMetadata.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/TransferOperationMetadata.php new file mode 100644 index 000000000000..6a51f19d65e6 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/TransferOperationMetadata.php @@ -0,0 +1,261 @@ +google.cloud.parallelstore.v1beta.TransferOperationMetadata + */ +class TransferOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The progress of the transfer operation. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.TransferCounters counters = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $counters = null; + /** + * Output only. The type of transfer occurring. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.TransferType transfer_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $transfer_type = 0; + protected $source; + protected $destination; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Parallelstore\V1beta\SourceParallelstore $source_parallelstore + * Output only. Parallelstore source. + * @type \Google\Cloud\Parallelstore\V1beta\SourceGcsBucket $source_gcs_bucket + * Output only. Cloud Storage source. + * @type \Google\Cloud\Parallelstore\V1beta\DestinationGcsBucket $destination_gcs_bucket + * Output only. Cloud Storage destination. + * @type \Google\Cloud\Parallelstore\V1beta\DestinationParallelstore $destination_parallelstore + * Output only. Parallelstore destination. + * @type \Google\Cloud\Parallelstore\V1beta\TransferCounters $counters + * Output only. The progress of the transfer operation. + * @type int $transfer_type + * Output only. The type of transfer occurring. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Parallelstore\V1Beta\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Parallelstore source. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.SourceParallelstore source_parallelstore = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Parallelstore\V1beta\SourceParallelstore|null + */ + public function getSourceParallelstore() + { + return $this->readOneof(7); + } + + public function hasSourceParallelstore() + { + return $this->hasOneof(7); + } + + /** + * Output only. Parallelstore source. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.SourceParallelstore source_parallelstore = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Parallelstore\V1beta\SourceParallelstore $var + * @return $this + */ + public function setSourceParallelstore($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1beta\SourceParallelstore::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Output only. Cloud Storage source. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.SourceGcsBucket source_gcs_bucket = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Parallelstore\V1beta\SourceGcsBucket|null + */ + public function getSourceGcsBucket() + { + return $this->readOneof(8); + } + + public function hasSourceGcsBucket() + { + return $this->hasOneof(8); + } + + /** + * Output only. Cloud Storage source. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.SourceGcsBucket source_gcs_bucket = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Parallelstore\V1beta\SourceGcsBucket $var + * @return $this + */ + public function setSourceGcsBucket($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1beta\SourceGcsBucket::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Output only. Cloud Storage destination. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.DestinationGcsBucket destination_gcs_bucket = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Parallelstore\V1beta\DestinationGcsBucket|null + */ + public function getDestinationGcsBucket() + { + return $this->readOneof(9); + } + + public function hasDestinationGcsBucket() + { + return $this->hasOneof(9); + } + + /** + * Output only. Cloud Storage destination. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.DestinationGcsBucket destination_gcs_bucket = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Parallelstore\V1beta\DestinationGcsBucket $var + * @return $this + */ + public function setDestinationGcsBucket($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1beta\DestinationGcsBucket::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Output only. Parallelstore destination. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.DestinationParallelstore destination_parallelstore = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Parallelstore\V1beta\DestinationParallelstore|null + */ + public function getDestinationParallelstore() + { + return $this->readOneof(10); + } + + public function hasDestinationParallelstore() + { + return $this->hasOneof(10); + } + + /** + * Output only. Parallelstore destination. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.DestinationParallelstore destination_parallelstore = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Parallelstore\V1beta\DestinationParallelstore $var + * @return $this + */ + public function setDestinationParallelstore($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1beta\DestinationParallelstore::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * Output only. The progress of the transfer operation. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.TransferCounters counters = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Parallelstore\V1beta\TransferCounters|null + */ + public function getCounters() + { + return $this->counters; + } + + public function hasCounters() + { + return isset($this->counters); + } + + public function clearCounters() + { + unset($this->counters); + } + + /** + * Output only. The progress of the transfer operation. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.TransferCounters counters = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Parallelstore\V1beta\TransferCounters $var + * @return $this + */ + public function setCounters($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1beta\TransferCounters::class); + $this->counters = $var; + + return $this; + } + + /** + * Output only. The type of transfer occurring. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.TransferType transfer_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getTransferType() + { + return $this->transfer_type; + } + + /** + * Output only. The type of transfer occurring. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.TransferType transfer_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setTransferType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Parallelstore\V1beta\TransferType::class); + $this->transfer_type = $var; + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/TransferType.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/TransferType.php new file mode 100644 index 000000000000..32f4f425911f --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/TransferType.php @@ -0,0 +1,61 @@ +google.cloud.parallelstore.v1beta.TransferType + */ +class TransferType +{ + /** + * Zero is an illegal value. + * + * Generated from protobuf enum TRANSFER_TYPE_UNSPECIFIED = 0; + */ + const TRANSFER_TYPE_UNSPECIFIED = 0; + /** + * Imports to Parallelstore. + * + * Generated from protobuf enum IMPORT = 1; + */ + const IMPORT = 1; + /** + * Exports from Parallelstore. + * + * Generated from protobuf enum EXPORT = 2; + */ + const EXPORT = 2; + + private static $valueToName = [ + self::TRANSFER_TYPE_UNSPECIFIED => 'TRANSFER_TYPE_UNSPECIFIED', + self::IMPORT => 'IMPORT', + self::EXPORT => 'EXPORT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __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/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/UpdateInstanceRequest.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/UpdateInstanceRequest.php new file mode 100644 index 000000000000..4ef5ca11a7b2 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/UpdateInstanceRequest.php @@ -0,0 +1,225 @@ +google.cloud.parallelstore.v1beta.UpdateInstanceRequest + */ +class UpdateInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Mask of fields to update. Field mask is used to specify the + * fields to be overwritten in the Instance resource by the update. At least + * one path must be supplied in this field. The fields specified in the + * update_mask are relative to the resource, not the full request. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The instance to update. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\Parallelstore\V1beta\Instance $instance Required. The instance to update. + * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. Field mask is used to specify the + * fields to be overwritten in the Instance resource by the update. At least + * one path must be supplied in this field. The fields specified in the + * update_mask are relative to the resource, not the full request. + * + * @return \Google\Cloud\Parallelstore\V1beta\UpdateInstanceRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Parallelstore\V1beta\Instance $instance, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setInstance($instance) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Mask of fields to update. Field mask is used to specify the + * fields to be overwritten in the Instance resource by the update. At least + * one path must be supplied in this field. The fields specified in the + * update_mask are relative to the resource, not the full request. + * @type \Google\Cloud\Parallelstore\V1beta\Instance $instance + * Required. The instance to update. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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\Parallelstore\V1Beta\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * Required. Mask of fields to update. Field mask is used to specify the + * fields to be overwritten in the Instance resource by the update. At least + * one path must be supplied in this field. The fields specified in the + * update_mask are relative to the resource, not the full request. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Mask of fields to update. Field mask is used to specify the + * fields to be overwritten in the Instance resource by the update. At least + * one path must be supplied in this field. The fields specified in the + * update_mask are relative to the resource, not the full request. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The instance to update. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Parallelstore\V1beta\Instance|null + */ + public function getInstance() + { + return $this->instance; + } + + public function hasInstance() + { + return isset($this->instance); + } + + public function clearInstance() + { + unset($this->instance); + } + + /** + * Required. The instance to update. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Parallelstore\V1beta\Instance $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1beta\Instance::class); + $this->instance = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and 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 = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/create_instance.php b/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/create_instance.php new file mode 100644 index 000000000000..a167a3c68518 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/create_instance.php @@ -0,0 +1,104 @@ +setCapacityGib($instanceCapacityGib); + $request = (new CreateInstanceRequest()) + ->setParent($formattedParent) + ->setInstanceId($instanceId) + ->setInstance($instance); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $parallelstoreClient->createInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ParallelstoreClient::locationName('[PROJECT]', '[LOCATION]'); + $instanceId = '[INSTANCE_ID]'; + $instanceCapacityGib = 0; + + create_instance_sample($formattedParent, $instanceId, $instanceCapacityGib); +} +// [END parallelstore_v1beta_generated_Parallelstore_CreateInstance_sync] diff --git a/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/delete_instance.php b/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/delete_instance.php new file mode 100644 index 000000000000..bc9e448eef16 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/delete_instance.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $parallelstoreClient->deleteInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ParallelstoreClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + delete_instance_sample($formattedName); +} +// [END parallelstore_v1beta_generated_Parallelstore_DeleteInstance_sync] diff --git a/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/export_data.php b/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/export_data.php new file mode 100644 index 000000000000..7ff721f7a80e --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/export_data.php @@ -0,0 +1,83 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $parallelstoreClient->exportData($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ExportDataResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ParallelstoreClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + export_data_sample($formattedName); +} +// [END parallelstore_v1beta_generated_Parallelstore_ExportData_sync] diff --git a/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/get_instance.php b/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/get_instance.php new file mode 100644 index 000000000000..4ac319b07fce --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/get_instance.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Instance $response */ + $response = $parallelstoreClient->getInstance($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ParallelstoreClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + get_instance_sample($formattedName); +} +// [END parallelstore_v1beta_generated_Parallelstore_GetInstance_sync] diff --git a/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/get_location.php b/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/get_location.php new file mode 100644 index 000000000000..a20382fc3d3e --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END parallelstore_v1beta_generated_Parallelstore_GetLocation_sync] diff --git a/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/import_data.php b/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/import_data.php new file mode 100644 index 000000000000..2bed07a1b4ba --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/import_data.php @@ -0,0 +1,83 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $parallelstoreClient->importData($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ImportDataResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ParallelstoreClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + import_data_sample($formattedName); +} +// [END parallelstore_v1beta_generated_Parallelstore_ImportData_sync] diff --git a/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/list_instances.php b/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/list_instances.php new file mode 100644 index 000000000000..3c500ce1f285 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/list_instances.php @@ -0,0 +1,80 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $parallelstoreClient->listInstances($request); + + /** @var Instance $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ParallelstoreClient::locationName('[PROJECT]', '[LOCATION]'); + + list_instances_sample($formattedParent); +} +// [END parallelstore_v1beta_generated_Parallelstore_ListInstances_sync] diff --git a/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/list_locations.php b/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/list_locations.php new file mode 100644 index 000000000000..914034ce8fea --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END parallelstore_v1beta_generated_Parallelstore_ListLocations_sync] diff --git a/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/update_instance.php b/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/update_instance.php new file mode 100644 index 000000000000..6d1a4798aee8 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/update_instance.php @@ -0,0 +1,89 @@ +setCapacityGib($instanceCapacityGib); + $request = (new UpdateInstanceRequest()) + ->setUpdateMask($updateMask) + ->setInstance($instance); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $parallelstoreClient->updateInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $instanceCapacityGib = 0; + + update_instance_sample($instanceCapacityGib); +} +// [END parallelstore_v1beta_generated_Parallelstore_UpdateInstance_sync] diff --git a/owl-bot-staging/Parallelstore/v1beta/src/V1beta/Client/ParallelstoreClient.php b/owl-bot-staging/Parallelstore/v1beta/src/V1beta/Client/ParallelstoreClient.php new file mode 100644 index 000000000000..299fd2e539da --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/src/V1beta/Client/ParallelstoreClient.php @@ -0,0 +1,647 @@ + createInstanceAsync(CreateInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteInstanceAsync(DeleteInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface exportDataAsync(ExportDataRequest $request, array $optionalArgs = []) + * @method PromiseInterface getInstanceAsync(GetInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface importDataAsync(ImportDataRequest $request, array $optionalArgs = []) + * @method PromiseInterface listInstancesAsync(ListInstancesRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateInstanceAsync(UpdateInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class ParallelstoreClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.parallelstore.v1beta.Parallelstore'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'parallelstore.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'parallelstore.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/parallelstore_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/parallelstore_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/parallelstore_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/parallelstore_rest_client_config.php', + ], + ], + ]; + } + + /** + * 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; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a address + * resource. + * + * @param string $project + * @param string $region + * @param string $address + * + * @return string The formatted address resource. + * + * @experimental + */ + public static function addressName(string $project, string $region, string $address): string + { + return self::getPathTemplate('address')->render([ + 'project' => $project, + 'region' => $region, + 'address' => $address, + ]); + } + + /** + * 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. + * + * @experimental + */ + public static function instanceName(string $project, string $location, string $instance): string + { + return self::getPathTemplate('instance')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + * + * @experimental + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $project + * @param string $network + * + * @return string The formatted network resource. + * + * @experimental + */ + public static function networkName(string $project, string $network): string + { + return self::getPathTemplate('network')->render([ + 'project' => $project, + 'network' => $network, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * service_account resource. + * + * @param string $project + * @param string $serviceAccount + * + * @return string The formatted service_account resource. + * + * @experimental + */ + public static function serviceAccountName(string $project, string $serviceAccount): string + { + return self::getPathTemplate('serviceAccount')->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 + * - address: projects/{project}/regions/{region}/addresses/{address} + * - instance: projects/{project}/locations/{location}/instances/{instance} + * - location: projects/{project}/locations/{location} + * - network: projects/{project}/global/networks/{network} + * - 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. + * + * @experimental + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'parallelstore.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); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a Parallelstore instance in a given project and location. + * + * The async variant is {@see ParallelstoreClient::createInstanceAsync()} . + * + * @example samples/V1beta/ParallelstoreClient/create_instance.php + * + * @param CreateInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function createInstance(CreateInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateInstance', $request, $callOptions)->wait(); + } + + /** + * Deletes a single instance. + * + * The async variant is {@see ParallelstoreClient::deleteInstanceAsync()} . + * + * @example samples/V1beta/ParallelstoreClient/delete_instance.php + * + * @param DeleteInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function deleteInstance(DeleteInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteInstance', $request, $callOptions)->wait(); + } + + /** + * Copies data from Parallelstore to Cloud Storage. + * + * The async variant is {@see ParallelstoreClient::exportDataAsync()} . + * + * @example samples/V1beta/ParallelstoreClient/export_data.php + * + * @param ExportDataRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function exportData(ExportDataRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ExportData', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single instance. + * + * The async variant is {@see ParallelstoreClient::getInstanceAsync()} . + * + * @example samples/V1beta/ParallelstoreClient/get_instance.php + * + * @param GetInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Instance + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function getInstance(GetInstanceRequest $request, array $callOptions = []): Instance + { + return $this->startApiCall('GetInstance', $request, $callOptions)->wait(); + } + + /** + * Copies data from Cloud Storage to Parallelstore. + * + * The async variant is {@see ParallelstoreClient::importDataAsync()} . + * + * @example samples/V1beta/ParallelstoreClient/import_data.php + * + * @param ImportDataRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function importData(ImportDataRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ImportData', $request, $callOptions)->wait(); + } + + /** + * Lists all instances in a given project and location. + * + * The async variant is {@see ParallelstoreClient::listInstancesAsync()} . + * + * @example samples/V1beta/ParallelstoreClient/list_instances.php + * + * @param ListInstancesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function listInstances(ListInstancesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListInstances', $request, $callOptions); + } + + /** + * Updates the parameters of a single instance. + * + * The async variant is {@see ParallelstoreClient::updateInstanceAsync()} . + * + * @example samples/V1beta/ParallelstoreClient/update_instance.php + * + * @param UpdateInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function updateInstance(UpdateInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateInstance', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see ParallelstoreClient::getLocationAsync()} . + * + * @example samples/V1beta/ParallelstoreClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see ParallelstoreClient::listLocationsAsync()} . + * + * @example samples/V1beta/ParallelstoreClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/Parallelstore/v1beta/src/V1beta/gapic_metadata.json b/owl-bot-staging/Parallelstore/v1beta/src/V1beta/gapic_metadata.json new file mode 100644 index 000000000000..7b389692ba7c --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/src/V1beta/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.parallelstore.v1beta", + "libraryPackage": "Google\\Cloud\\Parallelstore\\V1beta", + "services": { + "Parallelstore": { + "clients": { + "grpc": { + "libraryClient": "ParallelstoreGapicClient", + "rpcs": { + "CreateInstance": { + "methods": [ + "createInstance" + ] + }, + "DeleteInstance": { + "methods": [ + "deleteInstance" + ] + }, + "ExportData": { + "methods": [ + "exportData" + ] + }, + "GetInstance": { + "methods": [ + "getInstance" + ] + }, + "ImportData": { + "methods": [ + "importData" + ] + }, + "ListInstances": { + "methods": [ + "listInstances" + ] + }, + "UpdateInstance": { + "methods": [ + "updateInstance" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Parallelstore/v1beta/src/V1beta/resources/parallelstore_client_config.json b/owl-bot-staging/Parallelstore/v1beta/src/V1beta/resources/parallelstore_client_config.json new file mode 100644 index 000000000000..bc53acd55a4a --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/src/V1beta/resources/parallelstore_client_config.json @@ -0,0 +1,67 @@ +{ + "interfaces": { + "google.cloud.parallelstore.v1beta.Parallelstore": { + "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": { + "CreateInstance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteInstance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ExportData": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetInstance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ImportData": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListInstances": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateInstance": { + "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" + } + } + } + } +} diff --git a/owl-bot-staging/Parallelstore/v1beta/src/V1beta/resources/parallelstore_descriptor_config.php b/owl-bot-staging/Parallelstore/v1beta/src/V1beta/resources/parallelstore_descriptor_config.php new file mode 100644 index 000000000000..6ff219c559f2 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/src/V1beta/resources/parallelstore_descriptor_config.php @@ -0,0 +1,197 @@ + [ + 'google.cloud.parallelstore.v1beta.Parallelstore' => [ + 'CreateInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Parallelstore\V1beta\Instance', + 'metadataReturnType' => '\Google\Cloud\Parallelstore\V1beta\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Parallelstore\V1beta\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ExportData' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Parallelstore\V1beta\ExportDataResponse', + 'metadataReturnType' => '\Google\Cloud\Parallelstore\V1beta\ExportDataMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ImportData' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Parallelstore\V1beta\ImportDataResponse', + 'metadataReturnType' => '\Google\Cloud\Parallelstore\V1beta\ImportDataMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Parallelstore\V1beta\Instance', + 'metadataReturnType' => '\Google\Cloud\Parallelstore\V1beta\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'instance.name', + 'fieldAccessors' => [ + 'getInstance', + 'getName', + ], + ], + ], + ], + 'GetInstance' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Parallelstore\V1beta\Instance', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListInstances' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getInstances', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Parallelstore\V1beta\ListInstancesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'address' => 'projects/{project}/regions/{region}/addresses/{address}', + 'instance' => 'projects/{project}/locations/{location}/instances/{instance}', + 'location' => 'projects/{project}/locations/{location}', + 'network' => 'projects/{project}/global/networks/{network}', + 'serviceAccount' => 'projects/{project}/serviceAccounts/{service_account}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Parallelstore/v1beta/src/V1beta/resources/parallelstore_rest_client_config.php b/owl-bot-staging/Parallelstore/v1beta/src/V1beta/resources/parallelstore_rest_client_config.php new file mode 100644 index 000000000000..f1562b87effb --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/src/V1beta/resources/parallelstore_rest_client_config.php @@ -0,0 +1,187 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.parallelstore.v1beta.Parallelstore' => [ + 'CreateInstance' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*}/instances', + 'body' => 'instance', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'instance_id', + ], + ], + 'DeleteInstance' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/instances/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ExportData' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/instances/*}:exportData', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetInstance' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/instances/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ImportData' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/instances/*}:importData', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListInstances' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*}/instances', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateInstance' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1beta/{instance.name=projects/*/locations/*/instances/*}', + 'body' => 'instance', + 'placeholders' => [ + 'instance.name' => [ + 'getters' => [ + 'getInstance', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}:cancel', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Parallelstore/v1beta/tests/Unit/V1beta/Client/ParallelstoreClientTest.php b/owl-bot-staging/Parallelstore/v1beta/tests/Unit/V1beta/Client/ParallelstoreClientTest.php new file mode 100644 index 000000000000..3bb333809c18 --- /dev/null +++ b/owl-bot-staging/Parallelstore/v1beta/tests/Unit/V1beta/Client/ParallelstoreClientTest.php @@ -0,0 +1,1100 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ParallelstoreClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ParallelstoreClient($options); + } + + /** @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'; + $capacityGib = 498394811; + $daosVersion = 'daosVersion-1809382982'; + $network = 'network1843485230'; + $reservedIpRange = 'reservedIpRange-1082940580'; + $effectiveReservedIpRange = 'effectiveReservedIpRange-598066492'; + $expectedResponse = new Instance(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setCapacityGib($capacityGib); + $expectedResponse->setDaosVersion($daosVersion); + $expectedResponse->setNetwork($network); + $expectedResponse->setReservedIpRange($reservedIpRange); + $expectedResponse->setEffectiveReservedIpRange($effectiveReservedIpRange); + $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(); + $instanceCapacityGib = 1813257007; + $instance->setCapacityGib($instanceCapacityGib); + $request = (new CreateInstanceRequest()) + ->setParent($formattedParent) + ->setInstanceId($instanceId) + ->setInstance($instance); + $response = $gapicClient->createInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.parallelstore.v1beta.Parallelstore/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(); + $instanceCapacityGib = 1813257007; + $instance->setCapacityGib($instanceCapacityGib); + $request = (new CreateInstanceRequest()) + ->setParent($formattedParent) + ->setInstanceId($instanceId) + ->setInstance($instance); + $response = $gapicClient->createInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createInstanceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteInstanceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new DeleteInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.parallelstore.v1beta.Parallelstore/DeleteInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteInstanceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteInstanceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new DeleteInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteInstanceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function exportDataTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/exportDataTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new ExportDataResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/exportDataTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new ExportDataRequest()) + ->setName($formattedName); + $response = $gapicClient->exportData($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.parallelstore.v1beta.Parallelstore/ExportData', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportDataTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function exportDataExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/exportDataTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new ExportDataRequest()) + ->setName($formattedName); + $response = $gapicClient->exportData($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportDataTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getInstanceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $capacityGib = 498394811; + $daosVersion = 'daosVersion-1809382982'; + $network = 'network1843485230'; + $reservedIpRange = 'reservedIpRange-1082940580'; + $effectiveReservedIpRange = 'effectiveReservedIpRange-598066492'; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setCapacityGib($capacityGib); + $expectedResponse->setDaosVersion($daosVersion); + $expectedResponse->setNetwork($network); + $expectedResponse->setReservedIpRange($reservedIpRange); + $expectedResponse->setEffectiveReservedIpRange($effectiveReservedIpRange); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new GetInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->getInstance($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.parallelstore.v1beta.Parallelstore/GetInstance', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getInstanceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new GetInstanceRequest()) + ->setName($formattedName); + try { + $gapicClient->getInstance($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importDataTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importDataTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new ImportDataResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/importDataTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new ImportDataRequest()) + ->setName($formattedName); + $response = $gapicClient->importData($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.parallelstore.v1beta.Parallelstore/ImportData', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importDataTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function importDataExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importDataTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new ImportDataRequest()) + ->setName($formattedName); + $response = $gapicClient->importData($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importDataTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function listInstancesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $instancesElement = new Instance(); + $instances = [ + $instancesElement, + ]; + $expectedResponse = new ListInstancesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setInstances($instances); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListInstancesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listInstances($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getInstances()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.parallelstore.v1beta.Parallelstore/ListInstances', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listInstancesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListInstancesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listInstances($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function 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'; + $capacityGib = 498394811; + $daosVersion = 'daosVersion-1809382982'; + $network = 'network1843485230'; + $reservedIpRange = 'reservedIpRange-1082940580'; + $effectiveReservedIpRange = 'effectiveReservedIpRange-598066492'; + $expectedResponse = new Instance(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setCapacityGib($capacityGib); + $expectedResponse->setDaosVersion($daosVersion); + $expectedResponse->setNetwork($network); + $expectedResponse->setReservedIpRange($reservedIpRange); + $expectedResponse->setEffectiveReservedIpRange($effectiveReservedIpRange); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $instance = new Instance(); + $instanceCapacityGib = 1813257007; + $instance->setCapacityGib($instanceCapacityGib); + $request = (new UpdateInstanceRequest()) + ->setUpdateMask($updateMask) + ->setInstance($instance); + $response = $gapicClient->updateInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.parallelstore.v1beta.Parallelstore/UpdateInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getInstance(); + $this->assertProtobufEquals($instance, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateInstanceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateInstanceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $instance = new Instance(); + $instanceCapacityGib = 1813257007; + $instance->setCapacityGib($instanceCapacityGib); + $request = (new UpdateInstanceRequest()) + ->setUpdateMask($updateMask) + ->setInstance($instance); + $response = $gapicClient->updateInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateInstanceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createInstanceAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->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'; + $capacityGib = 498394811; + $daosVersion = 'daosVersion-1809382982'; + $network = 'network1843485230'; + $reservedIpRange = 'reservedIpRange-1082940580'; + $effectiveReservedIpRange = 'effectiveReservedIpRange-598066492'; + $expectedResponse = new Instance(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setCapacityGib($capacityGib); + $expectedResponse->setDaosVersion($daosVersion); + $expectedResponse->setNetwork($network); + $expectedResponse->setReservedIpRange($reservedIpRange); + $expectedResponse->setEffectiveReservedIpRange($effectiveReservedIpRange); + $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(); + $instanceCapacityGib = 1813257007; + $instance->setCapacityGib($instanceCapacityGib); + $request = (new CreateInstanceRequest()) + ->setParent($formattedParent) + ->setInstanceId($instanceId) + ->setInstance($instance); + $response = $gapicClient->createInstanceAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.parallelstore.v1beta.Parallelstore/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()); + } +} From f252ee39d34918190767ae2ae3344c9b0395aa18 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 4 Dec 2024 23:04:45 +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 --- .../metadata/V1Beta/Parallelstore.php | Bin 8605 -> 8766 bytes .../src}/V1beta/DeploymentType.php | 0 Parallelstore/src/V1beta/Instance.php | 42 + .../Cloud/Parallelstore/V1/Parallelstore.php | Bin 8431 -> 0 bytes .../V1/CreateInstanceRequest.php | 273 ---- .../V1/DeleteInstanceRequest.php | 155 --- .../Parallelstore/V1/DestinationGcsBucket.php | 75 -- .../V1/DestinationParallelstore.php | 71 -- .../Parallelstore/V1/DirectoryStripeLevel.php | 68 - .../Parallelstore/V1/ExportDataMetadata.php | 351 ------ .../Parallelstore/V1/ExportDataRequest.php | 287 ----- .../Parallelstore/V1/ExportDataResponse.php | 33 - .../Parallelstore/V1/FileStripeLevel.php | 68 - .../Parallelstore/V1/GetInstanceRequest.php | 86 -- .../Parallelstore/V1/ImportDataMetadata.php | 351 ------ .../Parallelstore/V1/ImportDataRequest.php | 287 ----- .../Parallelstore/V1/ImportDataResponse.php | 33 - .../Cloud/Parallelstore/V1/Instance.php | 625 ---------- .../Cloud/Parallelstore/V1/Instance/State.php | 85 -- .../Parallelstore/V1/ListInstancesRequest.php | 237 ---- .../V1/ListInstancesResponse.php | 136 -- .../Parallelstore/V1/OperationMetadata.php | 307 ----- .../Parallelstore/V1/SourceGcsBucket.php | 75 -- .../Parallelstore/V1/SourceParallelstore.php | 71 -- .../Parallelstore/V1/TransferCounters.php | 261 ---- .../V1/TransferOperationMetadata.php | 261 ---- .../Cloud/Parallelstore/V1/TransferType.php | 61 - .../V1/UpdateInstanceRequest.php | 225 ---- .../ParallelstoreClient/create_instance.php | 104 -- .../ParallelstoreClient/delete_instance.php | 80 -- .../V1/ParallelstoreClient/export_data.php | 83 -- .../V1/ParallelstoreClient/get_instance.php | 72 -- .../V1/ParallelstoreClient/get_location.php | 57 - .../V1/ParallelstoreClient/import_data.php | 83 -- .../V1/ParallelstoreClient/list_instances.php | 80 -- .../V1/ParallelstoreClient/list_locations.php | 62 - .../ParallelstoreClient/update_instance.php | 89 -- .../v1/src/V1/Client/ParallelstoreClient.php | 607 --------- .../v1/src/V1/gapic_metadata.json | 63 - .../parallelstore_client_config.json | 67 - .../parallelstore_descriptor_config.php | 197 --- .../parallelstore_rest_client_config.php | 188 --- .../V1/Client/ParallelstoreClientTest.php | 1100 ----------------- .../Parallelstore/V1Beta/Parallelstore.php | Bin 8766 -> 0 bytes .../V1beta/CreateInstanceRequest.php | 273 ---- .../V1beta/DeleteInstanceRequest.php | 155 --- .../V1beta/DestinationGcsBucket.php | 75 -- .../V1beta/DestinationParallelstore.php | 71 -- .../V1beta/DirectoryStripeLevel.php | 68 - .../V1beta/ExportDataMetadata.php | 351 ------ .../V1beta/ExportDataRequest.php | 287 ----- .../V1beta/ExportDataResponse.php | 33 - .../Parallelstore/V1beta/FileStripeLevel.php | 68 - .../V1beta/GetInstanceRequest.php | 86 -- .../V1beta/ImportDataMetadata.php | 351 ------ .../V1beta/ImportDataRequest.php | 287 ----- .../V1beta/ImportDataResponse.php | 33 - .../Cloud/Parallelstore/V1beta/Instance.php | 667 ---------- .../Parallelstore/V1beta/Instance/State.php | 85 -- .../V1beta/ListInstancesRequest.php | 237 ---- .../V1beta/ListInstancesResponse.php | 136 -- .../V1beta/OperationMetadata.php | 307 ----- .../Parallelstore/V1beta/SourceGcsBucket.php | 75 -- .../V1beta/SourceParallelstore.php | 71 -- .../Parallelstore/V1beta/TransferCounters.php | 261 ---- .../V1beta/TransferOperationMetadata.php | 261 ---- .../Parallelstore/V1beta/TransferType.php | 61 - .../V1beta/UpdateInstanceRequest.php | 225 ---- .../ParallelstoreClient/create_instance.php | 104 -- .../ParallelstoreClient/delete_instance.php | 80 -- .../ParallelstoreClient/export_data.php | 83 -- .../ParallelstoreClient/get_instance.php | 72 -- .../ParallelstoreClient/get_location.php | 57 - .../ParallelstoreClient/import_data.php | 83 -- .../ParallelstoreClient/list_instances.php | 80 -- .../ParallelstoreClient/list_locations.php | 62 - .../ParallelstoreClient/update_instance.php | 89 -- .../src/V1beta/Client/ParallelstoreClient.php | 647 ---------- .../v1beta/src/V1beta/gapic_metadata.json | 63 - .../parallelstore_client_config.json | 67 - .../parallelstore_descriptor_config.php | 197 --- .../parallelstore_rest_client_config.php | 187 --- .../V1beta/Client/ParallelstoreClientTest.php | 1100 ----------------- 83 files changed, 42 insertions(+), 14909 deletions(-) rename {owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore => Parallelstore/src}/V1beta/DeploymentType.php (100%) delete mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/GPBMetadata/Google/Cloud/Parallelstore/V1/Parallelstore.php delete mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/CreateInstanceRequest.php delete mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/DeleteInstanceRequest.php delete mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/DestinationGcsBucket.php delete mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/DestinationParallelstore.php delete mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/DirectoryStripeLevel.php delete mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ExportDataMetadata.php delete mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ExportDataRequest.php delete mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ExportDataResponse.php delete mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/FileStripeLevel.php delete mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/GetInstanceRequest.php delete mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ImportDataMetadata.php delete mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ImportDataRequest.php delete mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ImportDataResponse.php delete mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/Instance.php delete mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/Instance/State.php delete mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ListInstancesRequest.php delete mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ListInstancesResponse.php delete mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/SourceGcsBucket.php delete mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/SourceParallelstore.php delete mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/TransferCounters.php delete mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/TransferOperationMetadata.php delete mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/TransferType.php delete mode 100644 owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/UpdateInstanceRequest.php delete mode 100644 owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/create_instance.php delete mode 100644 owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/delete_instance.php delete mode 100644 owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/export_data.php delete mode 100644 owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/get_instance.php delete mode 100644 owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/get_location.php delete mode 100644 owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/import_data.php delete mode 100644 owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/list_instances.php delete mode 100644 owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/list_locations.php delete mode 100644 owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/update_instance.php delete mode 100644 owl-bot-staging/Parallelstore/v1/src/V1/Client/ParallelstoreClient.php delete mode 100644 owl-bot-staging/Parallelstore/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/Parallelstore/v1/src/V1/resources/parallelstore_client_config.json delete mode 100644 owl-bot-staging/Parallelstore/v1/src/V1/resources/parallelstore_descriptor_config.php delete mode 100644 owl-bot-staging/Parallelstore/v1/src/V1/resources/parallelstore_rest_client_config.php delete mode 100644 owl-bot-staging/Parallelstore/v1/tests/Unit/V1/Client/ParallelstoreClientTest.php delete mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/GPBMetadata/Google/Cloud/Parallelstore/V1Beta/Parallelstore.php delete mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/CreateInstanceRequest.php delete mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/DeleteInstanceRequest.php delete mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/DestinationGcsBucket.php delete mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/DestinationParallelstore.php delete mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/DirectoryStripeLevel.php delete mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ExportDataMetadata.php delete mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ExportDataRequest.php delete mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ExportDataResponse.php delete mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/FileStripeLevel.php delete mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/GetInstanceRequest.php delete mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ImportDataMetadata.php delete mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ImportDataRequest.php delete mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ImportDataResponse.php delete mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/Instance.php delete mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/Instance/State.php delete mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ListInstancesRequest.php delete mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ListInstancesResponse.php delete mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/OperationMetadata.php delete mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/SourceGcsBucket.php delete mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/SourceParallelstore.php delete mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/TransferCounters.php delete mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/TransferOperationMetadata.php delete mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/TransferType.php delete mode 100644 owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/UpdateInstanceRequest.php delete mode 100644 owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/create_instance.php delete mode 100644 owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/delete_instance.php delete mode 100644 owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/export_data.php delete mode 100644 owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/get_instance.php delete mode 100644 owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/get_location.php delete mode 100644 owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/import_data.php delete mode 100644 owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/list_instances.php delete mode 100644 owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/list_locations.php delete mode 100644 owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/update_instance.php delete mode 100644 owl-bot-staging/Parallelstore/v1beta/src/V1beta/Client/ParallelstoreClient.php delete mode 100644 owl-bot-staging/Parallelstore/v1beta/src/V1beta/gapic_metadata.json delete mode 100644 owl-bot-staging/Parallelstore/v1beta/src/V1beta/resources/parallelstore_client_config.json delete mode 100644 owl-bot-staging/Parallelstore/v1beta/src/V1beta/resources/parallelstore_descriptor_config.php delete mode 100644 owl-bot-staging/Parallelstore/v1beta/src/V1beta/resources/parallelstore_rest_client_config.php delete mode 100644 owl-bot-staging/Parallelstore/v1beta/tests/Unit/V1beta/Client/ParallelstoreClientTest.php diff --git a/Parallelstore/metadata/V1Beta/Parallelstore.php b/Parallelstore/metadata/V1Beta/Parallelstore.php index 3bbcca5e213de9b06378c3daef9cf8438a1b6c85..33dd88ecf03ccdeaeac6a1a3ca83c87592d615d5 100644 GIT binary patch delta 160 zcmbR1yw7FBe`cn4)|(kwf*2V;Zw_GZp>K7c~>g?&} q>FOfDAjHkZ9_$?C7~.google.cloud.parallelstore.v1beta.DirectoryStripeLevel directory_stripe_level = 16 [(.google.api.field_behavior) = OPTIONAL]; */ protected $directory_stripe_level = 0; + /** + * Optional. The deployment type of the instance. Allowed values are: + * * `SCRATCH`: the instance is a scratch instance. + * * `PERSISTENT`: the instance is a persistent instance. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.DeploymentType deployment_type = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $deployment_type = 0; /** * Constructor. @@ -182,6 +190,10 @@ class Instance extends \Google\Protobuf\Internal\Message * involving a mix of small and large directories. * * `DIRECTORY_STRIPE_LEVEL_MAX`: recommended for directories with a large * number of files. + * @type int $deployment_type + * Optional. The deployment type of the instance. Allowed values are: + * * `SCRATCH`: the instance is a scratch instance. + * * `PERSISTENT`: the instance is a persistent instance. * } */ public function __construct($data = NULL) { @@ -621,5 +633,35 @@ public function setDirectoryStripeLevel($var) return $this; } + /** + * Optional. The deployment type of the instance. Allowed values are: + * * `SCRATCH`: the instance is a scratch instance. + * * `PERSISTENT`: the instance is a persistent instance. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.DeploymentType deployment_type = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getDeploymentType() + { + return $this->deployment_type; + } + + /** + * Optional. The deployment type of the instance. Allowed values are: + * * `SCRATCH`: the instance is a scratch instance. + * * `PERSISTENT`: the instance is a persistent instance. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.DeploymentType deployment_type = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setDeploymentType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Parallelstore\V1beta\DeploymentType::class); + $this->deployment_type = $var; + + return $this; + } + } diff --git a/owl-bot-staging/Parallelstore/v1/proto/src/GPBMetadata/Google/Cloud/Parallelstore/V1/Parallelstore.php b/owl-bot-staging/Parallelstore/v1/proto/src/GPBMetadata/Google/Cloud/Parallelstore/V1/Parallelstore.php deleted file mode 100644 index 0da87d8cc8afb9f56b4d726ce21300ad34db8e43..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8431 zcmeHM&2QVt6<><6R~diL+KJ+Jh;FiDYMf<-8*;<+KK_G;_HV_ zcUl&qOZSZ+9@R!848ILX+l4S-X!zVfpMQjw&z-M$j+10qif3Xeo;g~cy&Q1V9RpB+ zh7r&6*=v!7JsK-oEeMui!_`w83L7rA_g;G|%O5I)@D3s3M3>0c#LvS@*C05$Lwx0#fD_(*1#5>e(dzKureE`gsK6)SZC7>%sV3PwWa zOc*^ORm%aa4XB0&qk4dbO}z$~o*GtU_{<05Gu`8%E$0^7E z^t+5~i&Am3KS7roh70o9?s1&yBxBmoq3eRUlk@Bn8i_a=k0AMg9P=c=V`%6|H(P{9 zelBrGO6zEd#W0>hQ@a(lQqUf4@0JQ{#f@TNeex|lijr&Pf?6qVZ%#@Wp<#8cQhZ#P zOwg6}!d8K;$aG~xEp7qL1^CRxN2SfOx=x9PawlJ@pQ3NXF^Z>G=zNh+_#WiR55X*6 z_IdDhk~Qr*FA>@2;_)PF1ZfT%#pB81Me*pZB*kO;4-%T*GCaR1D9YqVEdX%5iiSZb zz{UU~mLTH4R;xGgfU;gf7ahF`F##u4 zAjme-vH-s7`+Ci!FbK(<{yxH+Bs83`+uazj3abt1;q;$Cu{DO1LMXxaP5lArE}X6z zjW)U`@O>191M|l@EJj_L0J9;NM-Amnp*?WZZ$O(z48J?IfpQQ4JFQ?W#JZJ(uo2-O zib_fy^M;brY8FU(h-TJ_Nqo{N=o`7S!!qrPn*K=wO@-Z^7$`c6B(2TetkO{=mr;^f z4PIBdRr=Od$TeSgq4#empiEl=sARRa17&;_jnl&4@-%4bJV@tu63TcUT?*U|#i&lZ z3e#jz1Z7uRNK%){w5b3b3rpnN!sK##9!>1BiEOj(yq6g&>a2amw)*p znMg`Fk0xkGV$_KSJ&)ajlEI-G`Wk3z=FxRSKkRI1b~%O03Gzua%*~k}V_m2)MVeZ_ z@JXlj%V;{Ve%w?%{8##ziaQ|YcyPiaXgVT3h`5#FME@=_;(#zt|Hq9#jc_#bd5KMb zk%+zy!K;FBIMM)I@H3JC+3)o6NCg^M4^D6TLgIk<7KKFay>mcfSistl7`7hWAd#XS zD+y)Yk&-^h=4Su zZncAk!MSUP;P`P*?4mR2>tPq?En)qv+JqSU*R4(B6B{VW>ITfwLAA>c2pDU$+yEKl zgg4QcA0Ub5A3KCKBI7IH8jx89NEoBu<>)gBO^S#S--h9E%&xJyOxpu_8VvMgIyBUd zec}Z#DRjwn#1MPE1H*AhgJ~>NCVaPeO<_pJm(aM_U$-3two@#U@iZFc+k>|>Ddfch z8Wqw}W$+xtcUj%u-6)i`%F|Nk_zGib@nLDFT;aoO;R$$f1>f$mkIOcXuJu@t2zUk)D&@*AM$uTTqriWZ&{%9n#r=*gV!MMz zbM|(h;O!s^YR3JSYB0Y4?C)RxI+4Xo^lsxhbW1SNuZG76i;?4l#mKP%{;h;YBEv0S z?juEHuMm9Tu{(Y5rOFN?W1`a2$sU46jyD!h@Rt%AkB`i_pUvXig}`${$H*ydChSPk zCoj~w=mBcDA}aDr^(wdTEh9Kg2_IlCX3Bk(KA#_Q;be~g32Me?>Aq^lw-2c1kNc}R z9qJdE;hBE+gxZZX{Q@a~e!KwW&F}KNXs55KyhB_1bSmyEa3$b1euCP1qu;CK>tAxT? zVt+3#<&#jxLUDM5Ma1#Ot)xi^-hd=GfP+T~C*oC1>n)IeL z`UD^QX2*;-~Ql6c!hb3-;hTx)ahZG SQSWk@&UW%k?-O)_(0>5sx$5iy diff --git a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/CreateInstanceRequest.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/CreateInstanceRequest.php deleted file mode 100644 index 602bfbf612b0..000000000000 --- a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/CreateInstanceRequest.php +++ /dev/null @@ -1,273 +0,0 @@ -google.cloud.parallelstore.v1.CreateInstanceRequest - */ -class CreateInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The instance's project and location, in the format - * `projects/{project}/locations/{location}`. - * Locations map to Google Cloud 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 Parallelstore instance. - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project / location - * - * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance_id = ''; - /** - * Required. The instance to create. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and 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 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The instance's project and location, in the format - * `projects/{project}/locations/{location}`. - * Locations map to Google Cloud zones; for example, `us-west1-b`. Please see - * {@see ParallelstoreClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Parallelstore\V1\Instance $instance Required. The instance to create. - * @param string $instanceId Required. The name of the Parallelstore instance. - * - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project / location - * - * @return \Google\Cloud\Parallelstore\V1\CreateInstanceRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Parallelstore\V1\Instance $instance, string $instanceId): self - { - return (new self()) - ->setParent($parent) - ->setInstance($instance) - ->setInstanceId($instanceId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The instance's project and location, in the format - * `projects/{project}/locations/{location}`. - * Locations map to Google Cloud zones; for example, `us-west1-b`. - * @type string $instance_id - * Required. The name of the Parallelstore instance. - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project / location - * @type \Google\Cloud\Parallelstore\V1\Instance $instance - * Required. The instance to create. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and 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\Parallelstore\V1\Parallelstore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The instance's project and location, in the format - * `projects/{project}/locations/{location}`. - * Locations map to Google Cloud 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}/locations/{location}`. - * Locations map to Google Cloud 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 Parallelstore instance. - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project / 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 Parallelstore instance. - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project / 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. The instance to create. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Parallelstore\V1\Instance|null - */ - public function getInstance() - { - return $this->instance; - } - - public function hasInstance() - { - return isset($this->instance); - } - - public function clearInstance() - { - unset($this->instance); - } - - /** - * Required. The instance to create. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Parallelstore\V1\Instance $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1\Instance::class); - $this->instance = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and 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 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and 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 [(.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/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/DeleteInstanceRequest.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/DeleteInstanceRequest.php deleted file mode 100644 index af5164d5b835..000000000000 --- a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/DeleteInstanceRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.parallelstore.v1.DeleteInstanceRequest - */ -class DeleteInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and 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 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. Name of the resource - * Please see {@see ParallelstoreClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\Parallelstore\V1\DeleteInstanceRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the resource - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and 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\Parallelstore\V1\Parallelstore::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the resource - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and 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 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and 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 [(.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/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/DestinationGcsBucket.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/DestinationGcsBucket.php deleted file mode 100644 index 0acc29d59857..000000000000 --- a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/DestinationGcsBucket.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.parallelstore.v1.DestinationGcsBucket - */ -class DestinationGcsBucket extends \Google\Protobuf\Internal\Message -{ - /** - * Required. URI to a Cloud Storage bucket in the format: - * `gs:///`. The path inside the bucket is - * optional. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * Required. URI to a Cloud Storage bucket in the format: - * `gs:///`. The path inside the bucket is - * optional. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Parallelstore\V1\Parallelstore::initOnce(); - parent::__construct($data); - } - - /** - * Required. URI to a Cloud Storage bucket in the format: - * `gs:///`. The path inside the bucket is - * optional. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Required. URI to a Cloud Storage bucket in the format: - * `gs:///`. The path inside the bucket is - * optional. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/DestinationParallelstore.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/DestinationParallelstore.php deleted file mode 100644 index 79e74ab6adf9..000000000000 --- a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/DestinationParallelstore.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.parallelstore.v1.DestinationParallelstore - */ -class DestinationParallelstore extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Root directory path to the Paralellstore filesystem, starting - * with `/`. Defaults to `/` if unset. - * - * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $path = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $path - * Optional. Root directory path to the Paralellstore filesystem, starting - * with `/`. Defaults to `/` if unset. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Parallelstore\V1\Parallelstore::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Root directory path to the Paralellstore filesystem, starting - * with `/`. Defaults to `/` if unset. - * - * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Optional. Root directory path to the Paralellstore filesystem, starting - * with `/`. Defaults to `/` if unset. - * - * Generated from protobuf field string path = 1 [(.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/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/DirectoryStripeLevel.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/DirectoryStripeLevel.php deleted file mode 100644 index d55b9050370c..000000000000 --- a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/DirectoryStripeLevel.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.parallelstore.v1.DirectoryStripeLevel - */ -class DirectoryStripeLevel -{ - /** - * If not set, DirectoryStripeLevel will default to DIRECTORY_STRIPE_LEVEL_MAX - * - * Generated from protobuf enum DIRECTORY_STRIPE_LEVEL_UNSPECIFIED = 0; - */ - const DIRECTORY_STRIPE_LEVEL_UNSPECIFIED = 0; - /** - * Minimum directory striping - * - * Generated from protobuf enum DIRECTORY_STRIPE_LEVEL_MIN = 1; - */ - const DIRECTORY_STRIPE_LEVEL_MIN = 1; - /** - * Medium directory striping - * - * Generated from protobuf enum DIRECTORY_STRIPE_LEVEL_BALANCED = 2; - */ - const DIRECTORY_STRIPE_LEVEL_BALANCED = 2; - /** - * Maximum directory striping - * - * Generated from protobuf enum DIRECTORY_STRIPE_LEVEL_MAX = 3; - */ - const DIRECTORY_STRIPE_LEVEL_MAX = 3; - - private static $valueToName = [ - self::DIRECTORY_STRIPE_LEVEL_UNSPECIFIED => 'DIRECTORY_STRIPE_LEVEL_UNSPECIFIED', - self::DIRECTORY_STRIPE_LEVEL_MIN => 'DIRECTORY_STRIPE_LEVEL_MIN', - self::DIRECTORY_STRIPE_LEVEL_BALANCED => 'DIRECTORY_STRIPE_LEVEL_BALANCED', - self::DIRECTORY_STRIPE_LEVEL_MAX => 'DIRECTORY_STRIPE_LEVEL_MAX', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __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/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ExportDataMetadata.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ExportDataMetadata.php deleted file mode 100644 index 946a522a2a00..000000000000 --- a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ExportDataMetadata.php +++ /dev/null @@ -1,351 +0,0 @@ -google.cloud.parallelstore.v1.ExportDataMetadata - */ -class ExportDataMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Data transfer operation metadata. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.TransferOperationMetadata operation_metadata = 1; - */ - protected $operation_metadata = null; - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.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 = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target = ''; - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 5 [(.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 = 6 [(.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 = 7 [(.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 = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Parallelstore\V1\TransferOperationMetadata $operation_metadata - * Data transfer operation metadata. - * @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\Parallelstore\V1\Parallelstore::initOnce(); - parent::__construct($data); - } - - /** - * Data transfer operation metadata. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.TransferOperationMetadata operation_metadata = 1; - * @return \Google\Cloud\Parallelstore\V1\TransferOperationMetadata|null - */ - public function getOperationMetadata() - { - return $this->operation_metadata; - } - - public function hasOperationMetadata() - { - return isset($this->operation_metadata); - } - - public function clearOperationMetadata() - { - unset($this->operation_metadata); - } - - /** - * Data transfer operation metadata. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.TransferOperationMetadata operation_metadata = 1; - * @param \Google\Cloud\Parallelstore\V1\TransferOperationMetadata $var - * @return $this - */ - public function setOperationMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1\TransferOperationMetadata::class); - $this->operation_metadata = $var; - - return $this; - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.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 = 3 [(.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 = 4 [(.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 = 4 [(.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 = 5 [(.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 = 5 [(.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 = 6 [(.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 = 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. 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 = 7 [(.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 = 7 [(.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 = 8 [(.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 = 8 [(.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/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ExportDataRequest.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ExportDataRequest.php deleted file mode 100644 index 25a1ed7d4d1e..000000000000 --- a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ExportDataRequest.php +++ /dev/null @@ -1,287 +0,0 @@ -google.cloud.parallelstore.v1.ExportDataRequest - */ -class ExportDataRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes 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 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - /** - * Optional. User-specified Service Account (SA) credentials to be used when - * performing the transfer. - * Use one of the following formats: - * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * If unspecified, the Parallelstore service agent is used: - * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` - * - * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $service_account = ''; - protected $source; - protected $destination; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Parallelstore\V1\SourceParallelstore $source_parallelstore - * Parallelstore source. - * @type \Google\Cloud\Parallelstore\V1\DestinationGcsBucket $destination_gcs_bucket - * Cloud Storage destination. - * @type string $name - * Required. Name of the resource. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes 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 string $service_account - * Optional. User-specified Service Account (SA) credentials to be used when - * performing the transfer. - * Use one of the following formats: - * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * If unspecified, the Parallelstore service agent is used: - * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Parallelstore\V1\Parallelstore::initOnce(); - parent::__construct($data); - } - - /** - * Parallelstore source. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.SourceParallelstore source_parallelstore = 2; - * @return \Google\Cloud\Parallelstore\V1\SourceParallelstore|null - */ - public function getSourceParallelstore() - { - return $this->readOneof(2); - } - - public function hasSourceParallelstore() - { - return $this->hasOneof(2); - } - - /** - * Parallelstore source. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.SourceParallelstore source_parallelstore = 2; - * @param \Google\Cloud\Parallelstore\V1\SourceParallelstore $var - * @return $this - */ - public function setSourceParallelstore($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1\SourceParallelstore::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Cloud Storage destination. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.DestinationGcsBucket destination_gcs_bucket = 3; - * @return \Google\Cloud\Parallelstore\V1\DestinationGcsBucket|null - */ - public function getDestinationGcsBucket() - { - return $this->readOneof(3); - } - - public function hasDestinationGcsBucket() - { - return $this->hasOneof(3); - } - - /** - * Cloud Storage destination. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.DestinationGcsBucket destination_gcs_bucket = 3; - * @param \Google\Cloud\Parallelstore\V1\DestinationGcsBucket $var - * @return $this - */ - public function setDestinationGcsBucket($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1\DestinationGcsBucket::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes 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 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server 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 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. User-specified Service Account (SA) credentials to be used when - * performing the transfer. - * Use one of the following formats: - * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * If unspecified, the Parallelstore service agent is used: - * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` - * - * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getServiceAccount() - { - return $this->service_account; - } - - /** - * Optional. User-specified Service Account (SA) credentials to be used when - * performing the transfer. - * Use one of the following formats: - * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * If unspecified, the Parallelstore service agent is used: - * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` - * - * Generated from protobuf field string service_account = 5 [(.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; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - - /** - * @return string - */ - public function getDestination() - { - return $this->whichOneof("destination"); - } - -} - diff --git a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ExportDataResponse.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ExportDataResponse.php deleted file mode 100644 index 7a2a7ca3f977..000000000000 --- a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ExportDataResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.parallelstore.v1.ExportDataResponse - */ -class ExportDataResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Parallelstore\V1\Parallelstore::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/FileStripeLevel.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/FileStripeLevel.php deleted file mode 100644 index 7f349e1ef995..000000000000 --- a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/FileStripeLevel.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.parallelstore.v1.FileStripeLevel - */ -class FileStripeLevel -{ - /** - * If not set, FileStripeLevel will default to FILE_STRIPE_LEVEL_BALANCED - * - * Generated from protobuf enum FILE_STRIPE_LEVEL_UNSPECIFIED = 0; - */ - const FILE_STRIPE_LEVEL_UNSPECIFIED = 0; - /** - * Minimum file striping - * - * Generated from protobuf enum FILE_STRIPE_LEVEL_MIN = 1; - */ - const FILE_STRIPE_LEVEL_MIN = 1; - /** - * Medium file striping - * - * Generated from protobuf enum FILE_STRIPE_LEVEL_BALANCED = 2; - */ - const FILE_STRIPE_LEVEL_BALANCED = 2; - /** - * Maximum file striping - * - * Generated from protobuf enum FILE_STRIPE_LEVEL_MAX = 3; - */ - const FILE_STRIPE_LEVEL_MAX = 3; - - private static $valueToName = [ - self::FILE_STRIPE_LEVEL_UNSPECIFIED => 'FILE_STRIPE_LEVEL_UNSPECIFIED', - self::FILE_STRIPE_LEVEL_MIN => 'FILE_STRIPE_LEVEL_MIN', - self::FILE_STRIPE_LEVEL_BALANCED => 'FILE_STRIPE_LEVEL_BALANCED', - self::FILE_STRIPE_LEVEL_MAX => 'FILE_STRIPE_LEVEL_MAX', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __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/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/GetInstanceRequest.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/GetInstanceRequest.php deleted file mode 100644 index 1faa91f63398..000000000000 --- a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/GetInstanceRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.parallelstore.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 = ''; - - /** - * @param string $name Required. The instance resource name, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}`. Please see - * {@see ParallelstoreClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\Parallelstore\V1\GetInstanceRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The instance resource name, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Parallelstore\V1\Parallelstore::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/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ImportDataMetadata.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ImportDataMetadata.php deleted file mode 100644 index e64fbf40267f..000000000000 --- a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ImportDataMetadata.php +++ /dev/null @@ -1,351 +0,0 @@ -google.cloud.parallelstore.v1.ImportDataMetadata - */ -class ImportDataMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Data transfer operation metadata. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.TransferOperationMetadata operation_metadata = 1; - */ - protected $operation_metadata = null; - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.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 = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target = ''; - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 5 [(.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 = 6 [(.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 = 7 [(.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 = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Parallelstore\V1\TransferOperationMetadata $operation_metadata - * Data transfer operation metadata. - * @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\Parallelstore\V1\Parallelstore::initOnce(); - parent::__construct($data); - } - - /** - * Data transfer operation metadata. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.TransferOperationMetadata operation_metadata = 1; - * @return \Google\Cloud\Parallelstore\V1\TransferOperationMetadata|null - */ - public function getOperationMetadata() - { - return $this->operation_metadata; - } - - public function hasOperationMetadata() - { - return isset($this->operation_metadata); - } - - public function clearOperationMetadata() - { - unset($this->operation_metadata); - } - - /** - * Data transfer operation metadata. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.TransferOperationMetadata operation_metadata = 1; - * @param \Google\Cloud\Parallelstore\V1\TransferOperationMetadata $var - * @return $this - */ - public function setOperationMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1\TransferOperationMetadata::class); - $this->operation_metadata = $var; - - return $this; - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.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 = 3 [(.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 = 4 [(.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 = 4 [(.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 = 5 [(.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 = 5 [(.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 = 6 [(.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 = 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. 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 = 7 [(.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 = 7 [(.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 = 8 [(.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 = 8 [(.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/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ImportDataRequest.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ImportDataRequest.php deleted file mode 100644 index e9822439ab58..000000000000 --- a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ImportDataRequest.php +++ /dev/null @@ -1,287 +0,0 @@ -google.cloud.parallelstore.v1.ImportDataRequest - */ -class ImportDataRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes 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 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - /** - * Optional. User-specified service account credentials to be used when - * performing the transfer. - * Use one of the following formats: - * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * If unspecified, the Parallelstore service agent is used: - * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` - * - * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $service_account = ''; - protected $source; - protected $destination; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Parallelstore\V1\SourceGcsBucket $source_gcs_bucket - * The Cloud Storage source bucket and, optionally, path inside the bucket. - * @type \Google\Cloud\Parallelstore\V1\DestinationParallelstore $destination_parallelstore - * Parallelstore destination. - * @type string $name - * Required. Name of the resource. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes 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 string $service_account - * Optional. User-specified service account credentials to be used when - * performing the transfer. - * Use one of the following formats: - * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * If unspecified, the Parallelstore service agent is used: - * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Parallelstore\V1\Parallelstore::initOnce(); - parent::__construct($data); - } - - /** - * The Cloud Storage source bucket and, optionally, path inside the bucket. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.SourceGcsBucket source_gcs_bucket = 2; - * @return \Google\Cloud\Parallelstore\V1\SourceGcsBucket|null - */ - public function getSourceGcsBucket() - { - return $this->readOneof(2); - } - - public function hasSourceGcsBucket() - { - return $this->hasOneof(2); - } - - /** - * The Cloud Storage source bucket and, optionally, path inside the bucket. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.SourceGcsBucket source_gcs_bucket = 2; - * @param \Google\Cloud\Parallelstore\V1\SourceGcsBucket $var - * @return $this - */ - public function setSourceGcsBucket($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1\SourceGcsBucket::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Parallelstore destination. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.DestinationParallelstore destination_parallelstore = 3; - * @return \Google\Cloud\Parallelstore\V1\DestinationParallelstore|null - */ - public function getDestinationParallelstore() - { - return $this->readOneof(3); - } - - public function hasDestinationParallelstore() - { - return $this->hasOneof(3); - } - - /** - * Parallelstore destination. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.DestinationParallelstore destination_parallelstore = 3; - * @param \Google\Cloud\Parallelstore\V1\DestinationParallelstore $var - * @return $this - */ - public function setDestinationParallelstore($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1\DestinationParallelstore::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes 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 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server 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 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. User-specified service account credentials to be used when - * performing the transfer. - * Use one of the following formats: - * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * If unspecified, the Parallelstore service agent is used: - * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` - * - * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getServiceAccount() - { - return $this->service_account; - } - - /** - * Optional. User-specified service account credentials to be used when - * performing the transfer. - * Use one of the following formats: - * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * If unspecified, the Parallelstore service agent is used: - * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` - * - * Generated from protobuf field string service_account = 5 [(.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; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - - /** - * @return string - */ - public function getDestination() - { - return $this->whichOneof("destination"); - } - -} - diff --git a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ImportDataResponse.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ImportDataResponse.php deleted file mode 100644 index 49d0ebaf5aee..000000000000 --- a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ImportDataResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.parallelstore.v1.ImportDataResponse - */ -class ImportDataResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Parallelstore\V1\Parallelstore::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/Instance.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/Instance.php deleted file mode 100644 index af2dc82ba626..000000000000 --- a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/Instance.php +++ /dev/null @@ -1,625 +0,0 @@ -google.cloud.parallelstore.v1.Instance - */ -class Instance extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The resource name of the instance, in the format - * `projects/{project}/locations/{location}/instances/{instance_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Optional. The description of the instance. 2048 characters or less. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Output only. The instance state. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.Instance.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The time when the instance 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 when the instance was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. Cloud Labels are a flexible and lightweight mechanism for - * organizing cloud resources into groups that reflect a customer's - * organizational needs and deployment strategies. See - * https://cloud.google.com/resource-manager/docs/labels-overview for details. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Required. Immutable. The instance's storage capacity in Gibibytes (GiB). - * Allowed values are between 12000 and 100000, in multiples of 4000; e.g., - * 12000, 16000, 20000, ... - * - * Generated from protobuf field int64 capacity_gib = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; - */ - protected $capacity_gib = 0; - /** - * Output only. The version of DAOS software running in the instance. - * - * Generated from protobuf field string daos_version = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $daos_version = ''; - /** - * Output only. A list of IPv4 addresses used for client side configuration. - * - * Generated from protobuf field repeated string access_points = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $access_points; - /** - * Optional. Immutable. The name of the Compute Engine - * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the - * instance is connected. - * - * Generated from protobuf field string network = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $network = ''; - /** - * Optional. Immutable. The ID of the IP address range being used by the - * instance's VPC network. See [Configure a VPC - * network](https://cloud.google.com/parallelstore/docs/vpc#create_and_configure_the_vpc). - * If no ID is provided, all ranges are considered. - * - * Generated from protobuf field string reserved_ip_range = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $reserved_ip_range = ''; - /** - * Output only. Immutable. The ID of the IP address range being used by the - * instance's VPC network. This field is populated by the service and contains - * the value currently used by the service. - * - * Generated from protobuf field string effective_reserved_ip_range = 14 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $effective_reserved_ip_range = ''; - /** - * Optional. Stripe level for files. Allowed values are: - * * `FILE_STRIPE_LEVEL_MIN`: offers the best performance for small size - * files. - * * `FILE_STRIPE_LEVEL_BALANCED`: balances performance for workloads - * involving a mix of small and large files. - * * `FILE_STRIPE_LEVEL_MAX`: higher throughput performance for larger files. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.FileStripeLevel file_stripe_level = 15 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $file_stripe_level = 0; - /** - * Optional. Stripe level for directories. Allowed values are: - * * `DIRECTORY_STRIPE_LEVEL_MIN`: recommended when directories contain a - * small number of files. - * * `DIRECTORY_STRIPE_LEVEL_BALANCED`: balances performance for workloads - * involving a mix of small and large directories. - * * `DIRECTORY_STRIPE_LEVEL_MAX`: recommended for directories with a large - * number of files. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.DirectoryStripeLevel directory_stripe_level = 16 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $directory_stripe_level = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The resource name of the instance, in the format - * `projects/{project}/locations/{location}/instances/{instance_id}`. - * @type string $description - * Optional. The description of the instance. 2048 characters or less. - * @type int $state - * Output only. The instance state. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the instance was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time when the instance was updated. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Cloud Labels are a flexible and lightweight mechanism for - * organizing cloud resources into groups that reflect a customer's - * organizational needs and deployment strategies. See - * https://cloud.google.com/resource-manager/docs/labels-overview for details. - * @type int|string $capacity_gib - * Required. Immutable. The instance's storage capacity in Gibibytes (GiB). - * Allowed values are between 12000 and 100000, in multiples of 4000; e.g., - * 12000, 16000, 20000, ... - * @type string $daos_version - * Output only. The version of DAOS software running in the instance. - * @type array|\Google\Protobuf\Internal\RepeatedField $access_points - * Output only. A list of IPv4 addresses used for client side configuration. - * @type string $network - * Optional. Immutable. The name of the Compute Engine - * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the - * instance is connected. - * @type string $reserved_ip_range - * Optional. Immutable. The ID of the IP address range being used by the - * instance's VPC network. See [Configure a VPC - * network](https://cloud.google.com/parallelstore/docs/vpc#create_and_configure_the_vpc). - * If no ID is provided, all ranges are considered. - * @type string $effective_reserved_ip_range - * Output only. Immutable. The ID of the IP address range being used by the - * instance's VPC network. This field is populated by the service and contains - * the value currently used by the service. - * @type int $file_stripe_level - * Optional. Stripe level for files. Allowed values are: - * * `FILE_STRIPE_LEVEL_MIN`: offers the best performance for small size - * files. - * * `FILE_STRIPE_LEVEL_BALANCED`: balances performance for workloads - * involving a mix of small and large files. - * * `FILE_STRIPE_LEVEL_MAX`: higher throughput performance for larger files. - * @type int $directory_stripe_level - * Optional. Stripe level for directories. Allowed values are: - * * `DIRECTORY_STRIPE_LEVEL_MIN`: recommended when directories contain a - * small number of files. - * * `DIRECTORY_STRIPE_LEVEL_BALANCED`: balances performance for workloads - * involving a mix of small and large directories. - * * `DIRECTORY_STRIPE_LEVEL_MAX`: recommended for directories with a large - * number of files. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Parallelstore\V1\Parallelstore::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The resource name of the instance, in the format - * `projects/{project}/locations/{location}/instances/{instance_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The resource name of the instance, in the format - * `projects/{project}/locations/{location}/instances/{instance_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The description of the instance. 2048 characters or less. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. The description of the instance. 2048 characters or less. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. The instance state. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.Instance.State state = 3 [(.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.parallelstore.v1.Instance.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Parallelstore\V1\Instance\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The time when the instance 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 instance 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 when the instance was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time when the instance was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional. Cloud Labels are a flexible and lightweight mechanism for - * organizing cloud resources into groups that reflect a customer's - * organizational needs and deployment strategies. See - * https://cloud.google.com/resource-manager/docs/labels-overview for details. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Cloud Labels are a flexible and lightweight mechanism for - * organizing cloud resources into groups that reflect a customer's - * organizational needs and deployment strategies. See - * https://cloud.google.com/resource-manager/docs/labels-overview for details. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Required. Immutable. The instance's storage capacity in Gibibytes (GiB). - * Allowed values are between 12000 and 100000, in multiples of 4000; e.g., - * 12000, 16000, 20000, ... - * - * Generated from protobuf field int64 capacity_gib = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; - * @return int|string - */ - public function getCapacityGib() - { - return $this->capacity_gib; - } - - /** - * Required. Immutable. The instance's storage capacity in Gibibytes (GiB). - * Allowed values are between 12000 and 100000, in multiples of 4000; e.g., - * 12000, 16000, 20000, ... - * - * Generated from protobuf field int64 capacity_gib = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; - * @param int|string $var - * @return $this - */ - public function setCapacityGib($var) - { - GPBUtil::checkInt64($var); - $this->capacity_gib = $var; - - return $this; - } - - /** - * Output only. The version of DAOS software running in the instance. - * - * Generated from protobuf field string daos_version = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDaosVersion() - { - return $this->daos_version; - } - - /** - * Output only. The version of DAOS software running in the instance. - * - * Generated from protobuf field string daos_version = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDaosVersion($var) - { - GPBUtil::checkString($var, True); - $this->daos_version = $var; - - return $this; - } - - /** - * Output only. A list of IPv4 addresses used for client side configuration. - * - * Generated from protobuf field repeated string access_points = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAccessPoints() - { - return $this->access_points; - } - - /** - * Output only. A list of IPv4 addresses used for client side configuration. - * - * Generated from protobuf field repeated string access_points = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAccessPoints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->access_points = $arr; - - return $this; - } - - /** - * Optional. Immutable. The name of the Compute Engine - * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the - * instance is connected. - * - * Generated from protobuf field string network = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * Optional. Immutable. The name of the Compute Engine - * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the - * instance is connected. - * - * Generated from protobuf field string network = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - - /** - * Optional. Immutable. The ID of the IP address range being used by the - * instance's VPC network. See [Configure a VPC - * network](https://cloud.google.com/parallelstore/docs/vpc#create_and_configure_the_vpc). - * If no ID is provided, all ranges are considered. - * - * Generated from protobuf field string reserved_ip_range = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getReservedIpRange() - { - return $this->reserved_ip_range; - } - - /** - * Optional. Immutable. The ID of the IP address range being used by the - * instance's VPC network. See [Configure a VPC - * network](https://cloud.google.com/parallelstore/docs/vpc#create_and_configure_the_vpc). - * If no ID is provided, all ranges are considered. - * - * Generated from protobuf field string reserved_ip_range = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setReservedIpRange($var) - { - GPBUtil::checkString($var, True); - $this->reserved_ip_range = $var; - - return $this; - } - - /** - * Output only. Immutable. The ID of the IP address range being used by the - * instance's VPC network. This field is populated by the service and contains - * the value currently used by the service. - * - * Generated from protobuf field string effective_reserved_ip_range = 14 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getEffectiveReservedIpRange() - { - return $this->effective_reserved_ip_range; - } - - /** - * Output only. Immutable. The ID of the IP address range being used by the - * instance's VPC network. This field is populated by the service and contains - * the value currently used by the service. - * - * Generated from protobuf field string effective_reserved_ip_range = 14 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setEffectiveReservedIpRange($var) - { - GPBUtil::checkString($var, True); - $this->effective_reserved_ip_range = $var; - - return $this; - } - - /** - * Optional. Stripe level for files. Allowed values are: - * * `FILE_STRIPE_LEVEL_MIN`: offers the best performance for small size - * files. - * * `FILE_STRIPE_LEVEL_BALANCED`: balances performance for workloads - * involving a mix of small and large files. - * * `FILE_STRIPE_LEVEL_MAX`: higher throughput performance for larger files. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.FileStripeLevel file_stripe_level = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getFileStripeLevel() - { - return $this->file_stripe_level; - } - - /** - * Optional. Stripe level for files. Allowed values are: - * * `FILE_STRIPE_LEVEL_MIN`: offers the best performance for small size - * files. - * * `FILE_STRIPE_LEVEL_BALANCED`: balances performance for workloads - * involving a mix of small and large files. - * * `FILE_STRIPE_LEVEL_MAX`: higher throughput performance for larger files. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.FileStripeLevel file_stripe_level = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setFileStripeLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Parallelstore\V1\FileStripeLevel::class); - $this->file_stripe_level = $var; - - return $this; - } - - /** - * Optional. Stripe level for directories. Allowed values are: - * * `DIRECTORY_STRIPE_LEVEL_MIN`: recommended when directories contain a - * small number of files. - * * `DIRECTORY_STRIPE_LEVEL_BALANCED`: balances performance for workloads - * involving a mix of small and large directories. - * * `DIRECTORY_STRIPE_LEVEL_MAX`: recommended for directories with a large - * number of files. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.DirectoryStripeLevel directory_stripe_level = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getDirectoryStripeLevel() - { - return $this->directory_stripe_level; - } - - /** - * Optional. Stripe level for directories. Allowed values are: - * * `DIRECTORY_STRIPE_LEVEL_MIN`: recommended when directories contain a - * small number of files. - * * `DIRECTORY_STRIPE_LEVEL_BALANCED`: balances performance for workloads - * involving a mix of small and large directories. - * * `DIRECTORY_STRIPE_LEVEL_MAX`: recommended for directories with a large - * number of files. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.DirectoryStripeLevel directory_stripe_level = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setDirectoryStripeLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Parallelstore\V1\DirectoryStripeLevel::class); - $this->directory_stripe_level = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/Instance/State.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/Instance/State.php deleted file mode 100644 index 8eabb8656dcb..000000000000 --- a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/Instance/State.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.parallelstore.v1.Instance.State - */ -class 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 ACTIVE = 2; - */ - const ACTIVE = 2; - /** - * The instance is being deleted. - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - /** - * The instance is not usable. - * - * Generated from protobuf enum FAILED = 4; - */ - const FAILED = 4; - /** - * The instance is being upgraded. - * - * Generated from protobuf enum UPGRADING = 5; - */ - const UPGRADING = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::ACTIVE => 'ACTIVE', - self::DELETING => 'DELETING', - self::FAILED => 'FAILED', - self::UPGRADING => 'UPGRADING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no 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\Parallelstore\V1\Instance_State::class); - diff --git a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ListInstancesRequest.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ListInstancesRequest.php deleted file mode 100644 index 0a02c88d3081..000000000000 --- a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ListInstancesRequest.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.parallelstore.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}`. - * To retrieve instance information for all locations, use "-" as the value of - * `{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, the server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Filtering results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The project and location for which to retrieve instance - * information, in the format `projects/{project_id}/locations/{location}`. - * - * To retrieve instance information for all locations, use "-" as the value of - * `{location}`. Please see - * {@see ParallelstoreClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Parallelstore\V1\ListInstancesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project and location for which to retrieve instance - * information, in the format `projects/{project_id}/locations/{location}`. - * To retrieve instance information for all locations, use "-" as the value of - * `{location}`. - * @type int $page_size - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, the server will pick an appropriate default. - * @type string $page_token - * Optional. A token identifying a page of results the server should return. - * @type string $filter - * Optional. Filtering results. - * @type string $order_by - * Optional. Hint for how to order the results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Parallelstore\V1\Parallelstore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location for which to retrieve instance - * information, in the format `projects/{project_id}/locations/{location}`. - * To retrieve instance information for all locations, use "-" as the value of - * `{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project and location for which to retrieve instance - * information, in the format `projects/{project_id}/locations/{location}`. - * To retrieve instance information for all locations, use "-" as the value of - * `{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Requested page size. Server may return fewer items than - * requested. 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. Requested page size. Server may return fewer items than - * requested. If unspecified, the server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. Filtering results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filtering results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ListInstancesResponse.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ListInstancesResponse.php deleted file mode 100644 index c8b9fd39f5d9..000000000000 --- a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/ListInstancesResponse.php +++ /dev/null @@ -1,136 +0,0 @@ -google.cloud.parallelstore.v1.ListInstancesResponse - */ -class ListInstancesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Parallelstore instances. - * - * Generated from protobuf field repeated .google.cloud.parallelstore.v1.Instance instances = 1; - */ - private $instances; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Parallelstore\V1\Instance>|\Google\Protobuf\Internal\RepeatedField $instances - * The list of Parallelstore instances. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Parallelstore\V1\Parallelstore::initOnce(); - parent::__construct($data); - } - - /** - * The list of Parallelstore instances. - * - * Generated from protobuf field repeated .google.cloud.parallelstore.v1.Instance instances = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInstances() - { - return $this->instances; - } - - /** - * The list of Parallelstore instances. - * - * Generated from protobuf field repeated .google.cloud.parallelstore.v1.Instance instances = 1; - * @param array<\Google\Cloud\Parallelstore\V1\Instance>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInstances($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Parallelstore\V1\Instance::class); - $this->instances = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/OperationMetadata.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/OperationMetadata.php deleted file mode 100644 index 98a34bef6798..000000000000 --- a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/OperationMetadata.php +++ /dev/null @@ -1,307 +0,0 @@ -google.cloud.parallelstore.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target = ''; - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $verb = ''; - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status_message = ''; - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been cancelled successfully - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $requested_cancellation = false; - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time the operation finished running. - * @type string $target - * Output only. Server-defined resource path for the target of the operation. - * @type string $verb - * Output only. Name of the verb executed by the operation. - * @type string $status_message - * Output only. Human-readable status of the operation, if any. - * @type bool $requested_cancellation - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been cancelled successfully - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * @type string $api_version - * Output only. API version used to start the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Parallelstore\V1\Parallelstore::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStatusMessage() - { - return $this->status_message; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStatusMessage($var) - { - GPBUtil::checkString($var, True); - $this->status_message = $var; - - return $this; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been cancelled successfully - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getRequestedCancellation() - { - return $this->requested_cancellation; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been cancelled successfully - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setRequestedCancellation($var) - { - GPBUtil::checkBool($var); - $this->requested_cancellation = $var; - - return $this; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkString($var, True); - $this->api_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/SourceGcsBucket.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/SourceGcsBucket.php deleted file mode 100644 index 6b042397ff31..000000000000 --- a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/SourceGcsBucket.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.parallelstore.v1.SourceGcsBucket - */ -class SourceGcsBucket extends \Google\Protobuf\Internal\Message -{ - /** - * Required. URI to a Cloud Storage bucket in the format: - * `gs:///`. The path inside the bucket is - * optional. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * Required. URI to a Cloud Storage bucket in the format: - * `gs:///`. The path inside the bucket is - * optional. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Parallelstore\V1\Parallelstore::initOnce(); - parent::__construct($data); - } - - /** - * Required. URI to a Cloud Storage bucket in the format: - * `gs:///`. The path inside the bucket is - * optional. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Required. URI to a Cloud Storage bucket in the format: - * `gs:///`. The path inside the bucket is - * optional. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/SourceParallelstore.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/SourceParallelstore.php deleted file mode 100644 index 63a37aaeebf2..000000000000 --- a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/SourceParallelstore.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.parallelstore.v1.SourceParallelstore - */ -class SourceParallelstore extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Root directory path to the Paralellstore filesystem, starting - * with `/`. Defaults to `/` if unset. - * - * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $path = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $path - * Optional. Root directory path to the Paralellstore filesystem, starting - * with `/`. Defaults to `/` if unset. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Parallelstore\V1\Parallelstore::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Root directory path to the Paralellstore filesystem, starting - * with `/`. Defaults to `/` if unset. - * - * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Optional. Root directory path to the Paralellstore filesystem, starting - * with `/`. Defaults to `/` if unset. - * - * Generated from protobuf field string path = 1 [(.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/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/TransferCounters.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/TransferCounters.php deleted file mode 100644 index 9b4b96f6fd44..000000000000 --- a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/TransferCounters.php +++ /dev/null @@ -1,261 +0,0 @@ -google.cloud.parallelstore.v1.TransferCounters - */ -class TransferCounters extends \Google\Protobuf\Internal\Message -{ - /** - * Objects found in the data source that are scheduled to be transferred, - * excluding any that are filtered based on object conditions or skipped due - * to sync. - * - * Generated from protobuf field int64 objects_found = 1; - */ - protected $objects_found = 0; - /** - * Bytes found in the data source that are scheduled to be transferred, - * excluding any that are filtered based on object conditions or skipped due - * to sync. - * - * Generated from protobuf field int64 bytes_found = 2; - */ - protected $bytes_found = 0; - /** - * Objects in the data source that are not transferred because they already - * exist in the data destination. - * - * Generated from protobuf field int64 objects_skipped = 3; - */ - protected $objects_skipped = 0; - /** - * Bytes in the data source that are not transferred because they already - * exist in the data destination. - * - * Generated from protobuf field int64 bytes_skipped = 4; - */ - protected $bytes_skipped = 0; - /** - * Objects that are copied to the data destination. - * - * Generated from protobuf field int64 objects_copied = 5; - */ - protected $objects_copied = 0; - /** - * Bytes that are copied to the data destination. - * - * Generated from protobuf field int64 bytes_copied = 6; - */ - protected $bytes_copied = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $objects_found - * Objects found in the data source that are scheduled to be transferred, - * excluding any that are filtered based on object conditions or skipped due - * to sync. - * @type int|string $bytes_found - * Bytes found in the data source that are scheduled to be transferred, - * excluding any that are filtered based on object conditions or skipped due - * to sync. - * @type int|string $objects_skipped - * Objects in the data source that are not transferred because they already - * exist in the data destination. - * @type int|string $bytes_skipped - * Bytes in the data source that are not transferred because they already - * exist in the data destination. - * @type int|string $objects_copied - * Objects that are copied to the data destination. - * @type int|string $bytes_copied - * Bytes that are copied to the data destination. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Parallelstore\V1\Parallelstore::initOnce(); - parent::__construct($data); - } - - /** - * Objects found in the data source that are scheduled to be transferred, - * excluding any that are filtered based on object conditions or skipped due - * to sync. - * - * Generated from protobuf field int64 objects_found = 1; - * @return int|string - */ - public function getObjectsFound() - { - return $this->objects_found; - } - - /** - * Objects found in the data source that are scheduled to be transferred, - * excluding any that are filtered based on object conditions or skipped due - * to sync. - * - * Generated from protobuf field int64 objects_found = 1; - * @param int|string $var - * @return $this - */ - public function setObjectsFound($var) - { - GPBUtil::checkInt64($var); - $this->objects_found = $var; - - return $this; - } - - /** - * Bytes found in the data source that are scheduled to be transferred, - * excluding any that are filtered based on object conditions or skipped due - * to sync. - * - * Generated from protobuf field int64 bytes_found = 2; - * @return int|string - */ - public function getBytesFound() - { - return $this->bytes_found; - } - - /** - * Bytes found in the data source that are scheduled to be transferred, - * excluding any that are filtered based on object conditions or skipped due - * to sync. - * - * Generated from protobuf field int64 bytes_found = 2; - * @param int|string $var - * @return $this - */ - public function setBytesFound($var) - { - GPBUtil::checkInt64($var); - $this->bytes_found = $var; - - return $this; - } - - /** - * Objects in the data source that are not transferred because they already - * exist in the data destination. - * - * Generated from protobuf field int64 objects_skipped = 3; - * @return int|string - */ - public function getObjectsSkipped() - { - return $this->objects_skipped; - } - - /** - * Objects in the data source that are not transferred because they already - * exist in the data destination. - * - * Generated from protobuf field int64 objects_skipped = 3; - * @param int|string $var - * @return $this - */ - public function setObjectsSkipped($var) - { - GPBUtil::checkInt64($var); - $this->objects_skipped = $var; - - return $this; - } - - /** - * Bytes in the data source that are not transferred because they already - * exist in the data destination. - * - * Generated from protobuf field int64 bytes_skipped = 4; - * @return int|string - */ - public function getBytesSkipped() - { - return $this->bytes_skipped; - } - - /** - * Bytes in the data source that are not transferred because they already - * exist in the data destination. - * - * Generated from protobuf field int64 bytes_skipped = 4; - * @param int|string $var - * @return $this - */ - public function setBytesSkipped($var) - { - GPBUtil::checkInt64($var); - $this->bytes_skipped = $var; - - return $this; - } - - /** - * Objects that are copied to the data destination. - * - * Generated from protobuf field int64 objects_copied = 5; - * @return int|string - */ - public function getObjectsCopied() - { - return $this->objects_copied; - } - - /** - * Objects that are copied to the data destination. - * - * Generated from protobuf field int64 objects_copied = 5; - * @param int|string $var - * @return $this - */ - public function setObjectsCopied($var) - { - GPBUtil::checkInt64($var); - $this->objects_copied = $var; - - return $this; - } - - /** - * Bytes that are copied to the data destination. - * - * Generated from protobuf field int64 bytes_copied = 6; - * @return int|string - */ - public function getBytesCopied() - { - return $this->bytes_copied; - } - - /** - * Bytes that are copied to the data destination. - * - * Generated from protobuf field int64 bytes_copied = 6; - * @param int|string $var - * @return $this - */ - public function setBytesCopied($var) - { - GPBUtil::checkInt64($var); - $this->bytes_copied = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/TransferOperationMetadata.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/TransferOperationMetadata.php deleted file mode 100644 index 0cdbf05167ac..000000000000 --- a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/TransferOperationMetadata.php +++ /dev/null @@ -1,261 +0,0 @@ -google.cloud.parallelstore.v1.TransferOperationMetadata - */ -class TransferOperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The progress of the transfer operation. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.TransferCounters counters = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $counters = null; - /** - * Output only. The type of transfer occurring. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.TransferType transfer_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $transfer_type = 0; - protected $source; - protected $destination; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Parallelstore\V1\SourceParallelstore $source_parallelstore - * Output only. Parallelstore source. - * @type \Google\Cloud\Parallelstore\V1\SourceGcsBucket $source_gcs_bucket - * Output only. Cloud Storage source. - * @type \Google\Cloud\Parallelstore\V1\DestinationGcsBucket $destination_gcs_bucket - * Output only. Cloud Storage destination. - * @type \Google\Cloud\Parallelstore\V1\DestinationParallelstore $destination_parallelstore - * Output only. Parallelstore destination. - * @type \Google\Cloud\Parallelstore\V1\TransferCounters $counters - * Output only. The progress of the transfer operation. - * @type int $transfer_type - * Output only. The type of transfer occurring. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Parallelstore\V1\Parallelstore::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Parallelstore source. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.SourceParallelstore source_parallelstore = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Parallelstore\V1\SourceParallelstore|null - */ - public function getSourceParallelstore() - { - return $this->readOneof(7); - } - - public function hasSourceParallelstore() - { - return $this->hasOneof(7); - } - - /** - * Output only. Parallelstore source. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.SourceParallelstore source_parallelstore = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Parallelstore\V1\SourceParallelstore $var - * @return $this - */ - public function setSourceParallelstore($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1\SourceParallelstore::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Output only. Cloud Storage source. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.SourceGcsBucket source_gcs_bucket = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Parallelstore\V1\SourceGcsBucket|null - */ - public function getSourceGcsBucket() - { - return $this->readOneof(8); - } - - public function hasSourceGcsBucket() - { - return $this->hasOneof(8); - } - - /** - * Output only. Cloud Storage source. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.SourceGcsBucket source_gcs_bucket = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Parallelstore\V1\SourceGcsBucket $var - * @return $this - */ - public function setSourceGcsBucket($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1\SourceGcsBucket::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Output only. Cloud Storage destination. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.DestinationGcsBucket destination_gcs_bucket = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Parallelstore\V1\DestinationGcsBucket|null - */ - public function getDestinationGcsBucket() - { - return $this->readOneof(9); - } - - public function hasDestinationGcsBucket() - { - return $this->hasOneof(9); - } - - /** - * Output only. Cloud Storage destination. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.DestinationGcsBucket destination_gcs_bucket = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Parallelstore\V1\DestinationGcsBucket $var - * @return $this - */ - public function setDestinationGcsBucket($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1\DestinationGcsBucket::class); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * Output only. Parallelstore destination. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.DestinationParallelstore destination_parallelstore = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Parallelstore\V1\DestinationParallelstore|null - */ - public function getDestinationParallelstore() - { - return $this->readOneof(10); - } - - public function hasDestinationParallelstore() - { - return $this->hasOneof(10); - } - - /** - * Output only. Parallelstore destination. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.DestinationParallelstore destination_parallelstore = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Parallelstore\V1\DestinationParallelstore $var - * @return $this - */ - public function setDestinationParallelstore($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1\DestinationParallelstore::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * Output only. The progress of the transfer operation. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.TransferCounters counters = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Parallelstore\V1\TransferCounters|null - */ - public function getCounters() - { - return $this->counters; - } - - public function hasCounters() - { - return isset($this->counters); - } - - public function clearCounters() - { - unset($this->counters); - } - - /** - * Output only. The progress of the transfer operation. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.TransferCounters counters = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Parallelstore\V1\TransferCounters $var - * @return $this - */ - public function setCounters($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1\TransferCounters::class); - $this->counters = $var; - - return $this; - } - - /** - * Output only. The type of transfer occurring. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.TransferType transfer_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getTransferType() - { - return $this->transfer_type; - } - - /** - * Output only. The type of transfer occurring. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.TransferType transfer_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setTransferType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Parallelstore\V1\TransferType::class); - $this->transfer_type = $var; - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - - /** - * @return string - */ - public function getDestination() - { - return $this->whichOneof("destination"); - } - -} - diff --git a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/TransferType.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/TransferType.php deleted file mode 100644 index cecde2a1b640..000000000000 --- a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/TransferType.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.parallelstore.v1.TransferType - */ -class TransferType -{ - /** - * Zero is an illegal value. - * - * Generated from protobuf enum TRANSFER_TYPE_UNSPECIFIED = 0; - */ - const TRANSFER_TYPE_UNSPECIFIED = 0; - /** - * Imports to Parallelstore. - * - * Generated from protobuf enum IMPORT = 1; - */ - const IMPORT = 1; - /** - * Exports from Parallelstore. - * - * Generated from protobuf enum EXPORT = 2; - */ - const EXPORT = 2; - - private static $valueToName = [ - self::TRANSFER_TYPE_UNSPECIFIED => 'TRANSFER_TYPE_UNSPECIFIED', - self::IMPORT => 'IMPORT', - self::EXPORT => 'EXPORT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __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/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/UpdateInstanceRequest.php b/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/UpdateInstanceRequest.php deleted file mode 100644 index e2e23b6223a6..000000000000 --- a/owl-bot-staging/Parallelstore/v1/proto/src/Google/Cloud/Parallelstore/V1/UpdateInstanceRequest.php +++ /dev/null @@ -1,225 +0,0 @@ -google.cloud.parallelstore.v1.UpdateInstanceRequest - */ -class UpdateInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Mask of fields to update. Field mask is used to specify the - * fields to be overwritten in the Instance resource by the update. At least - * one path must be supplied in this field. The fields specified in the - * update_mask are relative to the resource, not the full request. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. The instance to update. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and 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 = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\Parallelstore\V1\Instance $instance Required. The instance to update. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. Field mask is used to specify the - * fields to be overwritten in the Instance resource by the update. At least - * one path must be supplied in this field. The fields specified in the - * update_mask are relative to the resource, not the full request. - * - * @return \Google\Cloud\Parallelstore\V1\UpdateInstanceRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Parallelstore\V1\Instance $instance, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setInstance($instance) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. Field mask is used to specify the - * fields to be overwritten in the Instance resource by the update. At least - * one path must be supplied in this field. The fields specified in the - * update_mask are relative to the resource, not the full request. - * @type \Google\Cloud\Parallelstore\V1\Instance $instance - * Required. The instance to update. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and 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\Parallelstore\V1\Parallelstore::initOnce(); - parent::__construct($data); - } - - /** - * Required. Mask of fields to update. Field mask is used to specify the - * fields to be overwritten in the Instance resource by the update. At least - * one path must be supplied in this field. The fields specified in the - * update_mask are relative to the resource, not the full request. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Mask of fields to update. Field mask is used to specify the - * fields to be overwritten in the Instance resource by the update. At least - * one path must be supplied in this field. The fields specified in the - * update_mask are relative to the resource, not the full request. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The instance to update. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Parallelstore\V1\Instance|null - */ - public function getInstance() - { - return $this->instance; - } - - public function hasInstance() - { - return isset($this->instance); - } - - public function clearInstance() - { - unset($this->instance); - } - - /** - * Required. The instance to update. - * - * Generated from protobuf field .google.cloud.parallelstore.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Parallelstore\V1\Instance $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1\Instance::class); - $this->instance = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and 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 = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and 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 = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/create_instance.php b/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/create_instance.php deleted file mode 100644 index 56f45bf3e947..000000000000 --- a/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/create_instance.php +++ /dev/null @@ -1,104 +0,0 @@ -setCapacityGib($instanceCapacityGib); - $request = (new CreateInstanceRequest()) - ->setParent($formattedParent) - ->setInstanceId($instanceId) - ->setInstance($instance); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $parallelstoreClient->createInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ParallelstoreClient::locationName('[PROJECT]', '[LOCATION]'); - $instanceId = '[INSTANCE_ID]'; - $instanceCapacityGib = 0; - - create_instance_sample($formattedParent, $instanceId, $instanceCapacityGib); -} -// [END parallelstore_v1_generated_Parallelstore_CreateInstance_sync] diff --git a/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/delete_instance.php b/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/delete_instance.php deleted file mode 100644 index 8202d349d9ba..000000000000 --- a/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/delete_instance.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $parallelstoreClient->deleteInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ParallelstoreClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - - delete_instance_sample($formattedName); -} -// [END parallelstore_v1_generated_Parallelstore_DeleteInstance_sync] diff --git a/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/export_data.php b/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/export_data.php deleted file mode 100644 index 9a64b7551feb..000000000000 --- a/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/export_data.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $parallelstoreClient->exportData($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ExportDataResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ParallelstoreClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - - export_data_sample($formattedName); -} -// [END parallelstore_v1_generated_Parallelstore_ExportData_sync] diff --git a/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/get_instance.php b/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/get_instance.php deleted file mode 100644 index aba7bdaedf3d..000000000000 --- a/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/get_instance.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Instance $response */ - $response = $parallelstoreClient->getInstance($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ParallelstoreClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - - get_instance_sample($formattedName); -} -// [END parallelstore_v1_generated_Parallelstore_GetInstance_sync] diff --git a/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/get_location.php b/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/get_location.php deleted file mode 100644 index 0950b50a4c68..000000000000 --- a/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END parallelstore_v1_generated_Parallelstore_GetLocation_sync] diff --git a/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/import_data.php b/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/import_data.php deleted file mode 100644 index a4e745a904ed..000000000000 --- a/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/import_data.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $parallelstoreClient->importData($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ImportDataResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ParallelstoreClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - - import_data_sample($formattedName); -} -// [END parallelstore_v1_generated_Parallelstore_ImportData_sync] diff --git a/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/list_instances.php b/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/list_instances.php deleted file mode 100644 index 8388dfa1a884..000000000000 --- a/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/list_instances.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $parallelstoreClient->listInstances($request); - - /** @var Instance $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ParallelstoreClient::locationName('[PROJECT]', '[LOCATION]'); - - list_instances_sample($formattedParent); -} -// [END parallelstore_v1_generated_Parallelstore_ListInstances_sync] diff --git a/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/list_locations.php b/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/list_locations.php deleted file mode 100644 index 05b2ed1ff36a..000000000000 --- a/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END parallelstore_v1_generated_Parallelstore_ListLocations_sync] diff --git a/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/update_instance.php b/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/update_instance.php deleted file mode 100644 index a4aff2499ae7..000000000000 --- a/owl-bot-staging/Parallelstore/v1/samples/V1/ParallelstoreClient/update_instance.php +++ /dev/null @@ -1,89 +0,0 @@ -setCapacityGib($instanceCapacityGib); - $request = (new UpdateInstanceRequest()) - ->setUpdateMask($updateMask) - ->setInstance($instance); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $parallelstoreClient->updateInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $instanceCapacityGib = 0; - - update_instance_sample($instanceCapacityGib); -} -// [END parallelstore_v1_generated_Parallelstore_UpdateInstance_sync] diff --git a/owl-bot-staging/Parallelstore/v1/src/V1/Client/ParallelstoreClient.php b/owl-bot-staging/Parallelstore/v1/src/V1/Client/ParallelstoreClient.php deleted file mode 100644 index 93e81b6aa231..000000000000 --- a/owl-bot-staging/Parallelstore/v1/src/V1/Client/ParallelstoreClient.php +++ /dev/null @@ -1,607 +0,0 @@ - createInstanceAsync(CreateInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteInstanceAsync(DeleteInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface exportDataAsync(ExportDataRequest $request, array $optionalArgs = []) - * @method PromiseInterface getInstanceAsync(GetInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface importDataAsync(ImportDataRequest $request, array $optionalArgs = []) - * @method PromiseInterface listInstancesAsync(ListInstancesRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateInstanceAsync(UpdateInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class ParallelstoreClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.parallelstore.v1.Parallelstore'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'parallelstore.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'parallelstore.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/parallelstore_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/parallelstore_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/parallelstore_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/parallelstore_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a address - * resource. - * - * @param string $project - * @param string $region - * @param string $address - * - * @return string The formatted address resource. - */ - public static function addressName(string $project, string $region, string $address): string - { - return self::getPathTemplate('address')->render([ - 'project' => $project, - 'region' => $region, - 'address' => $address, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a instance - * resource. - * - * @param string $project - * @param string $location - * @param string $instance - * - * @return string The formatted instance resource. - */ - public static function instanceName(string $project, string $location, string $instance): string - { - return self::getPathTemplate('instance')->render([ - 'project' => $project, - 'location' => $location, - 'instance' => $instance, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a network - * resource. - * - * @param string $project - * @param string $network - * - * @return string The formatted network resource. - */ - public static function networkName(string $project, string $network): string - { - return self::getPathTemplate('network')->render([ - 'project' => $project, - 'network' => $network, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * service_account resource. - * - * @param string $project - * @param string $serviceAccount - * - * @return string The formatted service_account resource. - */ - public static function serviceAccountName(string $project, string $serviceAccount): string - { - return self::getPathTemplate('serviceAccount')->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 - * - address: projects/{project}/regions/{region}/addresses/{address} - * - instance: projects/{project}/locations/{location}/instances/{instance} - * - location: projects/{project}/locations/{location} - * - network: projects/{project}/global/networks/{network} - * - 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(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'parallelstore.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); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a Parallelstore instance in a given project and location. - * - * The async variant is {@see ParallelstoreClient::createInstanceAsync()} . - * - * @example samples/V1/ParallelstoreClient/create_instance.php - * - * @param CreateInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createInstance(CreateInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateInstance', $request, $callOptions)->wait(); - } - - /** - * Deletes a single instance. - * - * The async variant is {@see ParallelstoreClient::deleteInstanceAsync()} . - * - * @example samples/V1/ParallelstoreClient/delete_instance.php - * - * @param DeleteInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteInstance(DeleteInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteInstance', $request, $callOptions)->wait(); - } - - /** - * Copies data from Parallelstore to Cloud Storage. - * - * The async variant is {@see ParallelstoreClient::exportDataAsync()} . - * - * @example samples/V1/ParallelstoreClient/export_data.php - * - * @param ExportDataRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function exportData(ExportDataRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ExportData', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single instance. - * - * The async variant is {@see ParallelstoreClient::getInstanceAsync()} . - * - * @example samples/V1/ParallelstoreClient/get_instance.php - * - * @param GetInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Instance - * - * @throws ApiException Thrown if the API call fails. - */ - public function getInstance(GetInstanceRequest $request, array $callOptions = []): Instance - { - return $this->startApiCall('GetInstance', $request, $callOptions)->wait(); - } - - /** - * Copies data from Cloud Storage to Parallelstore. - * - * The async variant is {@see ParallelstoreClient::importDataAsync()} . - * - * @example samples/V1/ParallelstoreClient/import_data.php - * - * @param ImportDataRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function importData(ImportDataRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ImportData', $request, $callOptions)->wait(); - } - - /** - * Lists all instances in a given project and location. - * - * The async variant is {@see ParallelstoreClient::listInstancesAsync()} . - * - * @example samples/V1/ParallelstoreClient/list_instances.php - * - * @param ListInstancesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listInstances(ListInstancesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListInstances', $request, $callOptions); - } - - /** - * Updates the parameters of a single instance. - * - * The async variant is {@see ParallelstoreClient::updateInstanceAsync()} . - * - * @example samples/V1/ParallelstoreClient/update_instance.php - * - * @param UpdateInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateInstance(UpdateInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateInstance', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see ParallelstoreClient::getLocationAsync()} . - * - * @example samples/V1/ParallelstoreClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see ParallelstoreClient::listLocationsAsync()} . - * - * @example samples/V1/ParallelstoreClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/Parallelstore/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Parallelstore/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 2eaf40bfd51c..000000000000 --- a/owl-bot-staging/Parallelstore/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.parallelstore.v1", - "libraryPackage": "Google\\Cloud\\Parallelstore\\V1", - "services": { - "Parallelstore": { - "clients": { - "grpc": { - "libraryClient": "ParallelstoreGapicClient", - "rpcs": { - "CreateInstance": { - "methods": [ - "createInstance" - ] - }, - "DeleteInstance": { - "methods": [ - "deleteInstance" - ] - }, - "ExportData": { - "methods": [ - "exportData" - ] - }, - "GetInstance": { - "methods": [ - "getInstance" - ] - }, - "ImportData": { - "methods": [ - "importData" - ] - }, - "ListInstances": { - "methods": [ - "listInstances" - ] - }, - "UpdateInstance": { - "methods": [ - "updateInstance" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Parallelstore/v1/src/V1/resources/parallelstore_client_config.json b/owl-bot-staging/Parallelstore/v1/src/V1/resources/parallelstore_client_config.json deleted file mode 100644 index bc0e63dce49b..000000000000 --- a/owl-bot-staging/Parallelstore/v1/src/V1/resources/parallelstore_client_config.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "interfaces": { - "google.cloud.parallelstore.v1.Parallelstore": { - "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": { - "CreateInstance": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteInstance": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ExportData": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetInstance": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ImportData": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListInstances": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateInstance": { - "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" - } - } - } - } -} diff --git a/owl-bot-staging/Parallelstore/v1/src/V1/resources/parallelstore_descriptor_config.php b/owl-bot-staging/Parallelstore/v1/src/V1/resources/parallelstore_descriptor_config.php deleted file mode 100644 index 8f886377a798..000000000000 --- a/owl-bot-staging/Parallelstore/v1/src/V1/resources/parallelstore_descriptor_config.php +++ /dev/null @@ -1,197 +0,0 @@ - [ - 'google.cloud.parallelstore.v1.Parallelstore' => [ - 'CreateInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Parallelstore\V1\Instance', - 'metadataReturnType' => '\Google\Cloud\Parallelstore\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Parallelstore\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ExportData' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Parallelstore\V1\ExportDataResponse', - 'metadataReturnType' => '\Google\Cloud\Parallelstore\V1\ExportDataMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ImportData' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Parallelstore\V1\ImportDataResponse', - 'metadataReturnType' => '\Google\Cloud\Parallelstore\V1\ImportDataMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Parallelstore\V1\Instance', - 'metadataReturnType' => '\Google\Cloud\Parallelstore\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'instance.name', - 'fieldAccessors' => [ - 'getInstance', - 'getName', - ], - ], - ], - ], - 'GetInstance' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Parallelstore\V1\Instance', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListInstances' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getInstances', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Parallelstore\V1\ListInstancesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'address' => 'projects/{project}/regions/{region}/addresses/{address}', - 'instance' => 'projects/{project}/locations/{location}/instances/{instance}', - 'location' => 'projects/{project}/locations/{location}', - 'network' => 'projects/{project}/global/networks/{network}', - 'serviceAccount' => 'projects/{project}/serviceAccounts/{service_account}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Parallelstore/v1/src/V1/resources/parallelstore_rest_client_config.php b/owl-bot-staging/Parallelstore/v1/src/V1/resources/parallelstore_rest_client_config.php deleted file mode 100644 index f7d9fb7afb54..000000000000 --- a/owl-bot-staging/Parallelstore/v1/src/V1/resources/parallelstore_rest_client_config.php +++ /dev/null @@ -1,188 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.parallelstore.v1.Parallelstore' => [ - 'CreateInstance' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/instances', - 'body' => 'instance', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'instance_id', - ], - ], - 'DeleteInstance' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ExportData' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:exportData', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetInstance' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ImportData' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:importData', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListInstances' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/instances', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateInstance' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{instance.name=projects/*/locations/*/instances/*}', - 'body' => 'instance', - 'placeholders' => [ - 'instance.name' => [ - 'getters' => [ - 'getInstance', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Parallelstore/v1/tests/Unit/V1/Client/ParallelstoreClientTest.php b/owl-bot-staging/Parallelstore/v1/tests/Unit/V1/Client/ParallelstoreClientTest.php deleted file mode 100644 index 0b34f04570c6..000000000000 --- a/owl-bot-staging/Parallelstore/v1/tests/Unit/V1/Client/ParallelstoreClientTest.php +++ /dev/null @@ -1,1100 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ParallelstoreClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ParallelstoreClient($options); - } - - /** @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'; - $capacityGib = 498394811; - $daosVersion = 'daosVersion-1809382982'; - $network = 'network1843485230'; - $reservedIpRange = 'reservedIpRange-1082940580'; - $effectiveReservedIpRange = 'effectiveReservedIpRange-598066492'; - $expectedResponse = new Instance(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setCapacityGib($capacityGib); - $expectedResponse->setDaosVersion($daosVersion); - $expectedResponse->setNetwork($network); - $expectedResponse->setReservedIpRange($reservedIpRange); - $expectedResponse->setEffectiveReservedIpRange($effectiveReservedIpRange); - $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(); - $instanceCapacityGib = 1813257007; - $instance->setCapacityGib($instanceCapacityGib); - $request = (new CreateInstanceRequest()) - ->setParent($formattedParent) - ->setInstanceId($instanceId) - ->setInstance($instance); - $response = $gapicClient->createInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.parallelstore.v1.Parallelstore/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(); - $instanceCapacityGib = 1813257007; - $instance->setCapacityGib($instanceCapacityGib); - $request = (new CreateInstanceRequest()) - ->setParent($formattedParent) - ->setInstanceId($instanceId) - ->setInstance($instance); - $response = $gapicClient->createInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createInstanceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteInstanceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new DeleteInstanceRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.parallelstore.v1.Parallelstore/DeleteInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteInstanceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteInstanceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new DeleteInstanceRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteInstanceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function exportDataTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/exportDataTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new ExportDataResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/exportDataTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new ExportDataRequest()) - ->setName($formattedName); - $response = $gapicClient->exportData($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.parallelstore.v1.Parallelstore/ExportData', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportDataTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function exportDataExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/exportDataTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new ExportDataRequest()) - ->setName($formattedName); - $response = $gapicClient->exportData($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportDataTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getInstanceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $capacityGib = 498394811; - $daosVersion = 'daosVersion-1809382982'; - $network = 'network1843485230'; - $reservedIpRange = 'reservedIpRange-1082940580'; - $effectiveReservedIpRange = 'effectiveReservedIpRange-598066492'; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setCapacityGib($capacityGib); - $expectedResponse->setDaosVersion($daosVersion); - $expectedResponse->setNetwork($network); - $expectedResponse->setReservedIpRange($reservedIpRange); - $expectedResponse->setEffectiveReservedIpRange($effectiveReservedIpRange); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new GetInstanceRequest()) - ->setName($formattedName); - $response = $gapicClient->getInstance($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.parallelstore.v1.Parallelstore/GetInstance', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getInstanceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new GetInstanceRequest()) - ->setName($formattedName); - try { - $gapicClient->getInstance($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function importDataTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/importDataTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new ImportDataResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/importDataTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new ImportDataRequest()) - ->setName($formattedName); - $response = $gapicClient->importData($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.parallelstore.v1.Parallelstore/ImportData', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importDataTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function importDataExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/importDataTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new ImportDataRequest()) - ->setName($formattedName); - $response = $gapicClient->importData($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importDataTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function listInstancesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $instancesElement = new Instance(); - $instances = [ - $instancesElement, - ]; - $expectedResponse = new ListInstancesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setInstances($instances); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListInstancesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listInstances($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getInstances()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.parallelstore.v1.Parallelstore/ListInstances', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listInstancesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListInstancesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listInstances($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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'; - $capacityGib = 498394811; - $daosVersion = 'daosVersion-1809382982'; - $network = 'network1843485230'; - $reservedIpRange = 'reservedIpRange-1082940580'; - $effectiveReservedIpRange = 'effectiveReservedIpRange-598066492'; - $expectedResponse = new Instance(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setCapacityGib($capacityGib); - $expectedResponse->setDaosVersion($daosVersion); - $expectedResponse->setNetwork($network); - $expectedResponse->setReservedIpRange($reservedIpRange); - $expectedResponse->setEffectiveReservedIpRange($effectiveReservedIpRange); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $instance = new Instance(); - $instanceCapacityGib = 1813257007; - $instance->setCapacityGib($instanceCapacityGib); - $request = (new UpdateInstanceRequest()) - ->setUpdateMask($updateMask) - ->setInstance($instance); - $response = $gapicClient->updateInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.parallelstore.v1.Parallelstore/UpdateInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getInstance(); - $this->assertProtobufEquals($instance, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateInstanceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateInstanceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $instance = new Instance(); - $instanceCapacityGib = 1813257007; - $instance->setCapacityGib($instanceCapacityGib); - $request = (new UpdateInstanceRequest()) - ->setUpdateMask($updateMask) - ->setInstance($instance); - $response = $gapicClient->updateInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateInstanceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createInstanceAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->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'; - $capacityGib = 498394811; - $daosVersion = 'daosVersion-1809382982'; - $network = 'network1843485230'; - $reservedIpRange = 'reservedIpRange-1082940580'; - $effectiveReservedIpRange = 'effectiveReservedIpRange-598066492'; - $expectedResponse = new Instance(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setCapacityGib($capacityGib); - $expectedResponse->setDaosVersion($daosVersion); - $expectedResponse->setNetwork($network); - $expectedResponse->setReservedIpRange($reservedIpRange); - $expectedResponse->setEffectiveReservedIpRange($effectiveReservedIpRange); - $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(); - $instanceCapacityGib = 1813257007; - $instance->setCapacityGib($instanceCapacityGib); - $request = (new CreateInstanceRequest()) - ->setParent($formattedParent) - ->setInstanceId($instanceId) - ->setInstance($instance); - $response = $gapicClient->createInstanceAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.parallelstore.v1.Parallelstore/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()); - } -} diff --git a/owl-bot-staging/Parallelstore/v1beta/proto/src/GPBMetadata/Google/Cloud/Parallelstore/V1Beta/Parallelstore.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/GPBMetadata/Google/Cloud/Parallelstore/V1Beta/Parallelstore.php deleted file mode 100644 index 33dd88ecf03ccdeaeac6a1a3ca83c87592d615d5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8766 zcmeGi&2Jl7eaF+J?#uVvq;=EncItF#8d_UTciENGEQ~*rnoSeqxK#@lW^BJWLnbrB z%sAa_6^UKM1##objoTjKe*me{3JHWj?d*b)rn>U_uoMh5)L86yV-h02_ z`+a{s-~Xn)ZKFA5m6*iQJknO0`--pt7REVv%9rL9HnLL+PXoUjG`1bl=Y38 zQYw~f*8$YEx=xGal#XR}43cdbR=1tCHAgcHVz{2=knG;wCh@fBVusy-kg4qw*VbA@ zS*_$B!m+mIY4ufxtX`nV>Xk6E`s2HKIJJaO%g|g`iEN_hNP&NLw`u4t#q~4~{=1>O z4c*i|T{HAgfWu{FOEX*o7!IG^>Y6Q2w@ifsY?v)Fe@o#w>De2$1rk|S1bG!IBoI)& zYE?1ho_Z*b0xTFhF}>5ltmwpO=gGFVr(4czfR@cI z>vUjM;#*&A-qtL$<8)0^H#_wWo7(*8WD}?y1YX*;z5VzE2cS$&4>fn^HDGHxxQnOl z+Jj-4h2Hs4_w7+_w*&KA0r#B`42GJ|P4v$t^xkXvExyjdGR)mG5qHmUcb~oFW7cdP zq5?H1?(?(PLK|DuW*SZ3X#4|L4js_JH2lrWp-sovzrQu-Zy7x$XRScVeaKn-0q4yU zsz!fPM6qC#)3*!C@=pljgA<<62tSbicM>JbCg=#F2cAObXn;#eiZp*AFTYZgIE6;q zev|;yOC`jPgiC0Mh69q4VQqZzZicgSjEpnlqRb`*q!-BeT{O~i2>jWgq@~UQvXRAE zflSby2`njq>e>){eW;;$P-|$|(3%kEQ^Sf3*Ss&TIod9IG_NtplIc17lm-dEg+^N% zZ*=r#DhWi$`QcaU&?_~8FQd`6X1R?$;>o#l)Y~M{G zpvK?Jq4Os3o>|ULYJ@@DV)&%5R0X|F(^}UfKGk5UZU&aJ>l^?V(G-{%arQ{Nq1z2d zGdmRW!8)&fIW4NHwHkkUe6gCIHL$ z;$jT>(?GDvK-VZF7k#~sF1B?Ch_syjDCS9qIgVzF0>L5l8)%|UY{S~$g)q?Y_HB}y zVrb(Sc`<;j0U)Dy_6`~enGYU8@($VOZidIu(4J;=3HPmB;sYtIp&{lWcm_>v*3??5 z@o0UsQYw^J%BAAu8+a5Y3)PZZE3dCkN*JMGwNNWRE=?xrPO-FBVmmV3Sy9Vt0CNtm zx$vm6T2+e_Xef8^rTPhaCmIR40|#a$ycOREFZ?0M+RZ-qzYem7)#Ax0`&@h;WOYA~ zz(MhOuy8?qx{FEinf|qerq^`WD+`D!`B4{A1ztwOKop4G4?=gqm%dW#H*ri_FQN;! z)&XmS;)zLgh+E7hgxI=g?GTfNEaq?$eiIFYc|t+NLXW>VgOZlhCQhTdpQ5paFQ)T)rN|xCQ(85}Gi{$6g~uBMY@a-bmMk_}JRkng)%v5Gm5% zL3ot}vJ;|PibQWAxR^>#e*wG|SRfWe3A|@j38WCA_lDl?rH};9qrf7VN=_#nUWdWpp+97KK!CEu~au_Czd8opV(bAQzQoQ zNI$J-Qfi-YddWNe;{=)t3QEz(^ygw)1`HBRUoO6jlEiHD^vwlxV)_QB^E3zAjh-jU zwEBQ#+3e|1##hidtueZ81L{Z@{JQ6jGM+;hea%C@YtaJ6Fj!22>@LkGsn%p#zd%3> zvhaB!aydPRCN^0!xY}~_-PR8A@FbGEj_yYuYF+7hG!0FXr<)A%@h9Kp=prp1Wy;pP z?H*1keFvpNI8QwOsf?z|ySC+cMd&q!Q*NLs-b^$)Ew|BR^fT8QiIr9RIDha4{sFoS zg`VIP0#T?X_MLMnMnpS`vj-ABn<-x#;O8SyhW+j5zyEVGk(3~qOwig#Z;=L6S5_BN z2oK#*K|%R6hpy||Zhz^t$stq@kWZpvF4g=Pt9ykw(o_khkNcJI7)|?1h>DAQ!8c-v zi|Zj`1E7niP~C)d5z;UX8S(1YkRk%J{U2AtG{Rv=;HfwL*F<c z$NKv*G*g4}*@aosiBU3U$O}hFuEkSC$sn!uqGV8(42qI80J6+-T$H4-aB!5QoeT$0 zgUrKrACh@*`TsJfnd!eL^WU9Amyb5T?;R0zs5(a$Uo+^iWC@X{HYlx7b9k+^BCvk{ z$aqG(;@6L79KVFgak&ezE6$R;#5LbWNtRcjqxUo7y;B5|0!>K(%CO;&(3s~(7~Wt~ z^BG^vo&uq0FXf}t)-NSADJ)6c4^8Em)nxr#V+&|%v!E!`PNTW+5!YX&VNIrei8$-- z=(bJTjB}YH;itti4N)?_h{nbFmSyX3oW>~`Poq(O++U^K$_phlDyXB(;HzNwRds!H zrBrRyo>uzXUT9~_4=Wqh8gF__PuO>2;b#(>=o=H@>*(qVbiR$vTD1&_)=G~{Ykghx zWi)g6$iwnFV1FCU9^T5UYwCIdnrS-R83d|6nUoiP1)c4n$pZcwN*Bx3QlYj{eR>>O zaQ6}CIBj$2+7bI90*^t$s9Zqh4@>K{LDC;V=Qj&gwN`il0vboC zQmSs2H*0WuGO_r@C>o1YG5EI<8jJMGIL=Ha0^!%XvmeB8iatO;Pvu{#{y5>YKmPp} ziF^32c-?sp6&p+$mV?p8LTIG15E^CR-$-aA)NSMUVo(!0FPJ#ZI3WG4mnxgY9-^9# zXOEycG<{h(!2giYc(k3zal{w}5wu?wEQdzbnV>LAe=5CDuZG9S!Ir2DUaD8Pyl?CN zz$f^CuAOnYoIbs7a>4ij{|oqycKfmTje^AF_a`yU_9ysKUE08|8(13}L=ZZ)*B}ptrc3Xps0`05>xsVdG_ z7)v(KJA>)Xs~U2mH|#NV-D zfU{*eyZO(~p?BbE<7CC>aU|_j=o@!M`tC>ERK$}MJd$**=!xq3tSj$t)5BkMmP!4%&Af?@yDBN2*sn)e4FbV!FjIA@>pkAtknABhMo`JW8; z$)gqg?f~@uyvCot0M5Pv&Ovh+pgil|&EO^YHvgeP=ywTpK&ZC{{3d~& diff --git a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/CreateInstanceRequest.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/CreateInstanceRequest.php deleted file mode 100644 index fe29cbe5c787..000000000000 --- a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/CreateInstanceRequest.php +++ /dev/null @@ -1,273 +0,0 @@ -google.cloud.parallelstore.v1beta.CreateInstanceRequest - */ -class CreateInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The instance's project and location, in the format - * `projects/{project}/locations/{location}`. - * Locations map to Google Cloud 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 Parallelstore instance. - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project / location - * - * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance_id = ''; - /** - * Required. The instance to create. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and 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 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The instance's project and location, in the format - * `projects/{project}/locations/{location}`. - * Locations map to Google Cloud zones; for example, `us-west1-b`. Please see - * {@see ParallelstoreClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Parallelstore\V1beta\Instance $instance Required. The instance to create. - * @param string $instanceId Required. The name of the Parallelstore instance. - * - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project / location - * - * @return \Google\Cloud\Parallelstore\V1beta\CreateInstanceRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Parallelstore\V1beta\Instance $instance, string $instanceId): self - { - return (new self()) - ->setParent($parent) - ->setInstance($instance) - ->setInstanceId($instanceId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The instance's project and location, in the format - * `projects/{project}/locations/{location}`. - * Locations map to Google Cloud zones; for example, `us-west1-b`. - * @type string $instance_id - * Required. The name of the Parallelstore instance. - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project / location - * @type \Google\Cloud\Parallelstore\V1beta\Instance $instance - * Required. The instance to create. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and 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\Parallelstore\V1Beta\Parallelstore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The instance's project and location, in the format - * `projects/{project}/locations/{location}`. - * Locations map to Google Cloud 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}/locations/{location}`. - * Locations map to Google Cloud 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 Parallelstore instance. - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project / 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 Parallelstore instance. - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project / 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. The instance to create. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Parallelstore\V1beta\Instance|null - */ - public function getInstance() - { - return $this->instance; - } - - public function hasInstance() - { - return isset($this->instance); - } - - public function clearInstance() - { - unset($this->instance); - } - - /** - * Required. The instance to create. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Parallelstore\V1beta\Instance $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1beta\Instance::class); - $this->instance = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and 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 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and 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 [(.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/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/DeleteInstanceRequest.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/DeleteInstanceRequest.php deleted file mode 100644 index a4a8255bf2da..000000000000 --- a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/DeleteInstanceRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.parallelstore.v1beta.DeleteInstanceRequest - */ -class DeleteInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and 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 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. Name of the resource - * Please see {@see ParallelstoreClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\Parallelstore\V1beta\DeleteInstanceRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the resource - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and 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\Parallelstore\V1Beta\Parallelstore::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the resource - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and 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 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and 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 [(.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/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/DestinationGcsBucket.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/DestinationGcsBucket.php deleted file mode 100644 index 8e7de4c6a1ef..000000000000 --- a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/DestinationGcsBucket.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.parallelstore.v1beta.DestinationGcsBucket - */ -class DestinationGcsBucket extends \Google\Protobuf\Internal\Message -{ - /** - * Required. URI to a Cloud Storage bucket in the format: - * `gs:///`. The path inside the bucket is - * optional. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * Required. URI to a Cloud Storage bucket in the format: - * `gs:///`. The path inside the bucket is - * optional. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Parallelstore\V1Beta\Parallelstore::initOnce(); - parent::__construct($data); - } - - /** - * Required. URI to a Cloud Storage bucket in the format: - * `gs:///`. The path inside the bucket is - * optional. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Required. URI to a Cloud Storage bucket in the format: - * `gs:///`. The path inside the bucket is - * optional. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/DestinationParallelstore.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/DestinationParallelstore.php deleted file mode 100644 index 8c0d829fa41e..000000000000 --- a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/DestinationParallelstore.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.parallelstore.v1beta.DestinationParallelstore - */ -class DestinationParallelstore extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Root directory path to the Paralellstore filesystem, starting - * with `/`. Defaults to `/` if unset. - * - * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $path = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $path - * Optional. Root directory path to the Paralellstore filesystem, starting - * with `/`. Defaults to `/` if unset. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Parallelstore\V1Beta\Parallelstore::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Root directory path to the Paralellstore filesystem, starting - * with `/`. Defaults to `/` if unset. - * - * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Optional. Root directory path to the Paralellstore filesystem, starting - * with `/`. Defaults to `/` if unset. - * - * Generated from protobuf field string path = 1 [(.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/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/DirectoryStripeLevel.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/DirectoryStripeLevel.php deleted file mode 100644 index 335a8d65009b..000000000000 --- a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/DirectoryStripeLevel.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.parallelstore.v1beta.DirectoryStripeLevel - */ -class DirectoryStripeLevel -{ - /** - * If not set, DirectoryStripeLevel will default to DIRECTORY_STRIPE_LEVEL_MAX - * - * Generated from protobuf enum DIRECTORY_STRIPE_LEVEL_UNSPECIFIED = 0; - */ - const DIRECTORY_STRIPE_LEVEL_UNSPECIFIED = 0; - /** - * Minimum directory striping - * - * Generated from protobuf enum DIRECTORY_STRIPE_LEVEL_MIN = 1; - */ - const DIRECTORY_STRIPE_LEVEL_MIN = 1; - /** - * Medium directory striping - * - * Generated from protobuf enum DIRECTORY_STRIPE_LEVEL_BALANCED = 2; - */ - const DIRECTORY_STRIPE_LEVEL_BALANCED = 2; - /** - * Maximum directory striping - * - * Generated from protobuf enum DIRECTORY_STRIPE_LEVEL_MAX = 3; - */ - const DIRECTORY_STRIPE_LEVEL_MAX = 3; - - private static $valueToName = [ - self::DIRECTORY_STRIPE_LEVEL_UNSPECIFIED => 'DIRECTORY_STRIPE_LEVEL_UNSPECIFIED', - self::DIRECTORY_STRIPE_LEVEL_MIN => 'DIRECTORY_STRIPE_LEVEL_MIN', - self::DIRECTORY_STRIPE_LEVEL_BALANCED => 'DIRECTORY_STRIPE_LEVEL_BALANCED', - self::DIRECTORY_STRIPE_LEVEL_MAX => 'DIRECTORY_STRIPE_LEVEL_MAX', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __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/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ExportDataMetadata.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ExportDataMetadata.php deleted file mode 100644 index 22a6f8b50cf3..000000000000 --- a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ExportDataMetadata.php +++ /dev/null @@ -1,351 +0,0 @@ -google.cloud.parallelstore.v1beta.ExportDataMetadata - */ -class ExportDataMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Data transfer operation metadata. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.TransferOperationMetadata operation_metadata = 1; - */ - protected $operation_metadata = null; - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.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 = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target = ''; - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 5 [(.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 = 6 [(.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 = 7 [(.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 = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Parallelstore\V1beta\TransferOperationMetadata $operation_metadata - * Data transfer operation metadata. - * @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\Parallelstore\V1Beta\Parallelstore::initOnce(); - parent::__construct($data); - } - - /** - * Data transfer operation metadata. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.TransferOperationMetadata operation_metadata = 1; - * @return \Google\Cloud\Parallelstore\V1beta\TransferOperationMetadata|null - */ - public function getOperationMetadata() - { - return $this->operation_metadata; - } - - public function hasOperationMetadata() - { - return isset($this->operation_metadata); - } - - public function clearOperationMetadata() - { - unset($this->operation_metadata); - } - - /** - * Data transfer operation metadata. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.TransferOperationMetadata operation_metadata = 1; - * @param \Google\Cloud\Parallelstore\V1beta\TransferOperationMetadata $var - * @return $this - */ - public function setOperationMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1beta\TransferOperationMetadata::class); - $this->operation_metadata = $var; - - return $this; - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.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 = 3 [(.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 = 4 [(.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 = 4 [(.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 = 5 [(.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 = 5 [(.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 = 6 [(.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 = 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. 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 = 7 [(.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 = 7 [(.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 = 8 [(.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 = 8 [(.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/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ExportDataRequest.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ExportDataRequest.php deleted file mode 100644 index b5b2af48db2a..000000000000 --- a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ExportDataRequest.php +++ /dev/null @@ -1,287 +0,0 @@ -google.cloud.parallelstore.v1beta.ExportDataRequest - */ -class ExportDataRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes 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 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - /** - * Optional. User-specified Service Account (SA) credentials to be used when - * performing the transfer. - * Use one of the following formats: - * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * If unspecified, the Parallelstore service agent is used: - * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` - * - * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $service_account = ''; - protected $source; - protected $destination; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Parallelstore\V1beta\SourceParallelstore $source_parallelstore - * Parallelstore source. - * @type \Google\Cloud\Parallelstore\V1beta\DestinationGcsBucket $destination_gcs_bucket - * Cloud Storage destination. - * @type string $name - * Required. Name of the resource. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes 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 string $service_account - * Optional. User-specified Service Account (SA) credentials to be used when - * performing the transfer. - * Use one of the following formats: - * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * If unspecified, the Parallelstore service agent is used: - * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Parallelstore\V1Beta\Parallelstore::initOnce(); - parent::__construct($data); - } - - /** - * Parallelstore source. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.SourceParallelstore source_parallelstore = 2; - * @return \Google\Cloud\Parallelstore\V1beta\SourceParallelstore|null - */ - public function getSourceParallelstore() - { - return $this->readOneof(2); - } - - public function hasSourceParallelstore() - { - return $this->hasOneof(2); - } - - /** - * Parallelstore source. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.SourceParallelstore source_parallelstore = 2; - * @param \Google\Cloud\Parallelstore\V1beta\SourceParallelstore $var - * @return $this - */ - public function setSourceParallelstore($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1beta\SourceParallelstore::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Cloud Storage destination. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.DestinationGcsBucket destination_gcs_bucket = 3; - * @return \Google\Cloud\Parallelstore\V1beta\DestinationGcsBucket|null - */ - public function getDestinationGcsBucket() - { - return $this->readOneof(3); - } - - public function hasDestinationGcsBucket() - { - return $this->hasOneof(3); - } - - /** - * Cloud Storage destination. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.DestinationGcsBucket destination_gcs_bucket = 3; - * @param \Google\Cloud\Parallelstore\V1beta\DestinationGcsBucket $var - * @return $this - */ - public function setDestinationGcsBucket($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1beta\DestinationGcsBucket::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes 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 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server 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 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. User-specified Service Account (SA) credentials to be used when - * performing the transfer. - * Use one of the following formats: - * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * If unspecified, the Parallelstore service agent is used: - * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` - * - * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getServiceAccount() - { - return $this->service_account; - } - - /** - * Optional. User-specified Service Account (SA) credentials to be used when - * performing the transfer. - * Use one of the following formats: - * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * If unspecified, the Parallelstore service agent is used: - * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` - * - * Generated from protobuf field string service_account = 5 [(.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; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - - /** - * @return string - */ - public function getDestination() - { - return $this->whichOneof("destination"); - } - -} - diff --git a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ExportDataResponse.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ExportDataResponse.php deleted file mode 100644 index 53ef6c9be2dc..000000000000 --- a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ExportDataResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.parallelstore.v1beta.ExportDataResponse - */ -class ExportDataResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Parallelstore\V1Beta\Parallelstore::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/FileStripeLevel.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/FileStripeLevel.php deleted file mode 100644 index 9b2e95057541..000000000000 --- a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/FileStripeLevel.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.parallelstore.v1beta.FileStripeLevel - */ -class FileStripeLevel -{ - /** - * If not set, FileStripeLevel will default to FILE_STRIPE_LEVEL_BALANCED - * - * Generated from protobuf enum FILE_STRIPE_LEVEL_UNSPECIFIED = 0; - */ - const FILE_STRIPE_LEVEL_UNSPECIFIED = 0; - /** - * Minimum file striping - * - * Generated from protobuf enum FILE_STRIPE_LEVEL_MIN = 1; - */ - const FILE_STRIPE_LEVEL_MIN = 1; - /** - * Medium file striping - * - * Generated from protobuf enum FILE_STRIPE_LEVEL_BALANCED = 2; - */ - const FILE_STRIPE_LEVEL_BALANCED = 2; - /** - * Maximum file striping - * - * Generated from protobuf enum FILE_STRIPE_LEVEL_MAX = 3; - */ - const FILE_STRIPE_LEVEL_MAX = 3; - - private static $valueToName = [ - self::FILE_STRIPE_LEVEL_UNSPECIFIED => 'FILE_STRIPE_LEVEL_UNSPECIFIED', - self::FILE_STRIPE_LEVEL_MIN => 'FILE_STRIPE_LEVEL_MIN', - self::FILE_STRIPE_LEVEL_BALANCED => 'FILE_STRIPE_LEVEL_BALANCED', - self::FILE_STRIPE_LEVEL_MAX => 'FILE_STRIPE_LEVEL_MAX', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __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/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/GetInstanceRequest.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/GetInstanceRequest.php deleted file mode 100644 index fd795fcc0f6b..000000000000 --- a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/GetInstanceRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.parallelstore.v1beta.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 = ''; - - /** - * @param string $name Required. The instance resource name, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}`. Please see - * {@see ParallelstoreClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\Parallelstore\V1beta\GetInstanceRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The instance resource name, in the format - * `projects/{project_id}/locations/{location}/instances/{instance_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Parallelstore\V1Beta\Parallelstore::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/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ImportDataMetadata.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ImportDataMetadata.php deleted file mode 100644 index 3c3cfac406bb..000000000000 --- a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ImportDataMetadata.php +++ /dev/null @@ -1,351 +0,0 @@ -google.cloud.parallelstore.v1beta.ImportDataMetadata - */ -class ImportDataMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Data transfer operation metadata. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.TransferOperationMetadata operation_metadata = 1; - */ - protected $operation_metadata = null; - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.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 = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target = ''; - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 5 [(.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 = 6 [(.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 = 7 [(.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 = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Parallelstore\V1beta\TransferOperationMetadata $operation_metadata - * Data transfer operation metadata. - * @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\Parallelstore\V1Beta\Parallelstore::initOnce(); - parent::__construct($data); - } - - /** - * Data transfer operation metadata. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.TransferOperationMetadata operation_metadata = 1; - * @return \Google\Cloud\Parallelstore\V1beta\TransferOperationMetadata|null - */ - public function getOperationMetadata() - { - return $this->operation_metadata; - } - - public function hasOperationMetadata() - { - return isset($this->operation_metadata); - } - - public function clearOperationMetadata() - { - unset($this->operation_metadata); - } - - /** - * Data transfer operation metadata. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.TransferOperationMetadata operation_metadata = 1; - * @param \Google\Cloud\Parallelstore\V1beta\TransferOperationMetadata $var - * @return $this - */ - public function setOperationMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1beta\TransferOperationMetadata::class); - $this->operation_metadata = $var; - - return $this; - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.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 = 3 [(.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 = 4 [(.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 = 4 [(.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 = 5 [(.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 = 5 [(.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 = 6 [(.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 = 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. 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 = 7 [(.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 = 7 [(.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 = 8 [(.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 = 8 [(.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/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ImportDataRequest.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ImportDataRequest.php deleted file mode 100644 index 7c2e0471a0dc..000000000000 --- a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ImportDataRequest.php +++ /dev/null @@ -1,287 +0,0 @@ -google.cloud.parallelstore.v1beta.ImportDataRequest - */ -class ImportDataRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes 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 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - /** - * Optional. User-specified service account credentials to be used when - * performing the transfer. - * Use one of the following formats: - * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * If unspecified, the Parallelstore service agent is used: - * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` - * - * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $service_account = ''; - protected $source; - protected $destination; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Parallelstore\V1beta\SourceGcsBucket $source_gcs_bucket - * The Cloud Storage source bucket and, optionally, path inside the bucket. - * @type \Google\Cloud\Parallelstore\V1beta\DestinationParallelstore $destination_parallelstore - * Parallelstore destination. - * @type string $name - * Required. Name of the resource. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes 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 string $service_account - * Optional. User-specified service account credentials to be used when - * performing the transfer. - * Use one of the following formats: - * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * If unspecified, the Parallelstore service agent is used: - * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Parallelstore\V1Beta\Parallelstore::initOnce(); - parent::__construct($data); - } - - /** - * The Cloud Storage source bucket and, optionally, path inside the bucket. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.SourceGcsBucket source_gcs_bucket = 2; - * @return \Google\Cloud\Parallelstore\V1beta\SourceGcsBucket|null - */ - public function getSourceGcsBucket() - { - return $this->readOneof(2); - } - - public function hasSourceGcsBucket() - { - return $this->hasOneof(2); - } - - /** - * The Cloud Storage source bucket and, optionally, path inside the bucket. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.SourceGcsBucket source_gcs_bucket = 2; - * @param \Google\Cloud\Parallelstore\V1beta\SourceGcsBucket $var - * @return $this - */ - public function setSourceGcsBucket($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1beta\SourceGcsBucket::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Parallelstore destination. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.DestinationParallelstore destination_parallelstore = 3; - * @return \Google\Cloud\Parallelstore\V1beta\DestinationParallelstore|null - */ - public function getDestinationParallelstore() - { - return $this->readOneof(3); - } - - public function hasDestinationParallelstore() - { - return $this->hasOneof(3); - } - - /** - * Parallelstore destination. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.DestinationParallelstore destination_parallelstore = 3; - * @param \Google\Cloud\Parallelstore\V1beta\DestinationParallelstore $var - * @return $this - */ - public function setDestinationParallelstore($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1beta\DestinationParallelstore::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes 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 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server 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 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. User-specified service account credentials to be used when - * performing the transfer. - * Use one of the following formats: - * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * If unspecified, the Parallelstore service agent is used: - * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` - * - * Generated from protobuf field string service_account = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getServiceAccount() - { - return $this->service_account; - } - - /** - * Optional. User-specified service account credentials to be used when - * performing the transfer. - * Use one of the following formats: - * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * If unspecified, the Parallelstore service agent is used: - * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` - * - * Generated from protobuf field string service_account = 5 [(.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; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - - /** - * @return string - */ - public function getDestination() - { - return $this->whichOneof("destination"); - } - -} - diff --git a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ImportDataResponse.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ImportDataResponse.php deleted file mode 100644 index 9eb5207960b1..000000000000 --- a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ImportDataResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.parallelstore.v1beta.ImportDataResponse - */ -class ImportDataResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Parallelstore\V1Beta\Parallelstore::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/Instance.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/Instance.php deleted file mode 100644 index f7bf0900d608..000000000000 --- a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/Instance.php +++ /dev/null @@ -1,667 +0,0 @@ -google.cloud.parallelstore.v1beta.Instance - */ -class Instance extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The resource name of the instance, in the format - * `projects/{project}/locations/{location}/instances/{instance_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Optional. The description of the instance. 2048 characters or less. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Output only. The instance state. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.Instance.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The time when the instance 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 when the instance was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. Cloud Labels are a flexible and lightweight mechanism for - * organizing cloud resources into groups that reflect a customer's - * organizational needs and deployment strategies. See - * https://cloud.google.com/resource-manager/docs/labels-overview for details. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Required. Immutable. The instance's storage capacity in Gibibytes (GiB). - * Allowed values are between 12000 and 100000, in multiples of 4000; e.g., - * 12000, 16000, 20000, ... - * - * Generated from protobuf field int64 capacity_gib = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; - */ - protected $capacity_gib = 0; - /** - * Output only. The version of DAOS software running in the instance. - * - * Generated from protobuf field string daos_version = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $daos_version = ''; - /** - * Output only. A list of IPv4 addresses used for client side configuration. - * - * Generated from protobuf field repeated string access_points = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $access_points; - /** - * Optional. Immutable. The name of the Compute Engine - * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the - * instance is connected. - * - * Generated from protobuf field string network = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $network = ''; - /** - * Optional. Immutable. The ID of the IP address range being used by the - * instance's VPC network. See [Configure a VPC - * network](https://cloud.google.com/parallelstore/docs/vpc#create_and_configure_the_vpc). - * If no ID is provided, all ranges are considered. - * - * Generated from protobuf field string reserved_ip_range = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $reserved_ip_range = ''; - /** - * Output only. Immutable. The ID of the IP address range being used by the - * instance's VPC network. This field is populated by the service and contains - * the value currently used by the service. - * - * Generated from protobuf field string effective_reserved_ip_range = 14 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $effective_reserved_ip_range = ''; - /** - * Optional. Stripe level for files. Allowed values are: - * * `FILE_STRIPE_LEVEL_MIN`: offers the best performance for small size - * files. - * * `FILE_STRIPE_LEVEL_BALANCED`: balances performance for workloads - * involving a mix of small and large files. - * * `FILE_STRIPE_LEVEL_MAX`: higher throughput performance for larger files. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.FileStripeLevel file_stripe_level = 15 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $file_stripe_level = 0; - /** - * Optional. Stripe level for directories. Allowed values are: - * * `DIRECTORY_STRIPE_LEVEL_MIN`: recommended when directories contain a - * small number of files. - * * `DIRECTORY_STRIPE_LEVEL_BALANCED`: balances performance for workloads - * involving a mix of small and large directories. - * * `DIRECTORY_STRIPE_LEVEL_MAX`: recommended for directories with a large - * number of files. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.DirectoryStripeLevel directory_stripe_level = 16 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $directory_stripe_level = 0; - /** - * Optional. The deployment type of the instance. Allowed values are: - * * `SCRATCH`: the instance is a scratch instance. - * * `PERSISTENT`: the instance is a persistent instance. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.DeploymentType deployment_type = 17 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $deployment_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The resource name of the instance, in the format - * `projects/{project}/locations/{location}/instances/{instance_id}`. - * @type string $description - * Optional. The description of the instance. 2048 characters or less. - * @type int $state - * Output only. The instance state. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the instance was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time when the instance was updated. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Cloud Labels are a flexible and lightweight mechanism for - * organizing cloud resources into groups that reflect a customer's - * organizational needs and deployment strategies. See - * https://cloud.google.com/resource-manager/docs/labels-overview for details. - * @type int|string $capacity_gib - * Required. Immutable. The instance's storage capacity in Gibibytes (GiB). - * Allowed values are between 12000 and 100000, in multiples of 4000; e.g., - * 12000, 16000, 20000, ... - * @type string $daos_version - * Output only. The version of DAOS software running in the instance. - * @type array|\Google\Protobuf\Internal\RepeatedField $access_points - * Output only. A list of IPv4 addresses used for client side configuration. - * @type string $network - * Optional. Immutable. The name of the Compute Engine - * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the - * instance is connected. - * @type string $reserved_ip_range - * Optional. Immutable. The ID of the IP address range being used by the - * instance's VPC network. See [Configure a VPC - * network](https://cloud.google.com/parallelstore/docs/vpc#create_and_configure_the_vpc). - * If no ID is provided, all ranges are considered. - * @type string $effective_reserved_ip_range - * Output only. Immutable. The ID of the IP address range being used by the - * instance's VPC network. This field is populated by the service and contains - * the value currently used by the service. - * @type int $file_stripe_level - * Optional. Stripe level for files. Allowed values are: - * * `FILE_STRIPE_LEVEL_MIN`: offers the best performance for small size - * files. - * * `FILE_STRIPE_LEVEL_BALANCED`: balances performance for workloads - * involving a mix of small and large files. - * * `FILE_STRIPE_LEVEL_MAX`: higher throughput performance for larger files. - * @type int $directory_stripe_level - * Optional. Stripe level for directories. Allowed values are: - * * `DIRECTORY_STRIPE_LEVEL_MIN`: recommended when directories contain a - * small number of files. - * * `DIRECTORY_STRIPE_LEVEL_BALANCED`: balances performance for workloads - * involving a mix of small and large directories. - * * `DIRECTORY_STRIPE_LEVEL_MAX`: recommended for directories with a large - * number of files. - * @type int $deployment_type - * Optional. The deployment type of the instance. Allowed values are: - * * `SCRATCH`: the instance is a scratch instance. - * * `PERSISTENT`: the instance is a persistent instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Parallelstore\V1Beta\Parallelstore::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The resource name of the instance, in the format - * `projects/{project}/locations/{location}/instances/{instance_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The resource name of the instance, in the format - * `projects/{project}/locations/{location}/instances/{instance_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The description of the instance. 2048 characters or less. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. The description of the instance. 2048 characters or less. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. The instance state. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.Instance.State state = 3 [(.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.parallelstore.v1beta.Instance.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Parallelstore\V1beta\Instance\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The time when the instance 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 instance 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 when the instance was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time when the instance was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional. Cloud Labels are a flexible and lightweight mechanism for - * organizing cloud resources into groups that reflect a customer's - * organizational needs and deployment strategies. See - * https://cloud.google.com/resource-manager/docs/labels-overview for details. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Cloud Labels are a flexible and lightweight mechanism for - * organizing cloud resources into groups that reflect a customer's - * organizational needs and deployment strategies. See - * https://cloud.google.com/resource-manager/docs/labels-overview for details. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Required. Immutable. The instance's storage capacity in Gibibytes (GiB). - * Allowed values are between 12000 and 100000, in multiples of 4000; e.g., - * 12000, 16000, 20000, ... - * - * Generated from protobuf field int64 capacity_gib = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; - * @return int|string - */ - public function getCapacityGib() - { - return $this->capacity_gib; - } - - /** - * Required. Immutable. The instance's storage capacity in Gibibytes (GiB). - * Allowed values are between 12000 and 100000, in multiples of 4000; e.g., - * 12000, 16000, 20000, ... - * - * Generated from protobuf field int64 capacity_gib = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; - * @param int|string $var - * @return $this - */ - public function setCapacityGib($var) - { - GPBUtil::checkInt64($var); - $this->capacity_gib = $var; - - return $this; - } - - /** - * Output only. The version of DAOS software running in the instance. - * - * Generated from protobuf field string daos_version = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDaosVersion() - { - return $this->daos_version; - } - - /** - * Output only. The version of DAOS software running in the instance. - * - * Generated from protobuf field string daos_version = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDaosVersion($var) - { - GPBUtil::checkString($var, True); - $this->daos_version = $var; - - return $this; - } - - /** - * Output only. A list of IPv4 addresses used for client side configuration. - * - * Generated from protobuf field repeated string access_points = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAccessPoints() - { - return $this->access_points; - } - - /** - * Output only. A list of IPv4 addresses used for client side configuration. - * - * Generated from protobuf field repeated string access_points = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAccessPoints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->access_points = $arr; - - return $this; - } - - /** - * Optional. Immutable. The name of the Compute Engine - * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the - * instance is connected. - * - * Generated from protobuf field string network = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * Optional. Immutable. The name of the Compute Engine - * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the - * instance is connected. - * - * Generated from protobuf field string network = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - - /** - * Optional. Immutable. The ID of the IP address range being used by the - * instance's VPC network. See [Configure a VPC - * network](https://cloud.google.com/parallelstore/docs/vpc#create_and_configure_the_vpc). - * If no ID is provided, all ranges are considered. - * - * Generated from protobuf field string reserved_ip_range = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getReservedIpRange() - { - return $this->reserved_ip_range; - } - - /** - * Optional. Immutable. The ID of the IP address range being used by the - * instance's VPC network. See [Configure a VPC - * network](https://cloud.google.com/parallelstore/docs/vpc#create_and_configure_the_vpc). - * If no ID is provided, all ranges are considered. - * - * Generated from protobuf field string reserved_ip_range = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setReservedIpRange($var) - { - GPBUtil::checkString($var, True); - $this->reserved_ip_range = $var; - - return $this; - } - - /** - * Output only. Immutable. The ID of the IP address range being used by the - * instance's VPC network. This field is populated by the service and contains - * the value currently used by the service. - * - * Generated from protobuf field string effective_reserved_ip_range = 14 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getEffectiveReservedIpRange() - { - return $this->effective_reserved_ip_range; - } - - /** - * Output only. Immutable. The ID of the IP address range being used by the - * instance's VPC network. This field is populated by the service and contains - * the value currently used by the service. - * - * Generated from protobuf field string effective_reserved_ip_range = 14 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setEffectiveReservedIpRange($var) - { - GPBUtil::checkString($var, True); - $this->effective_reserved_ip_range = $var; - - return $this; - } - - /** - * Optional. Stripe level for files. Allowed values are: - * * `FILE_STRIPE_LEVEL_MIN`: offers the best performance for small size - * files. - * * `FILE_STRIPE_LEVEL_BALANCED`: balances performance for workloads - * involving a mix of small and large files. - * * `FILE_STRIPE_LEVEL_MAX`: higher throughput performance for larger files. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.FileStripeLevel file_stripe_level = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getFileStripeLevel() - { - return $this->file_stripe_level; - } - - /** - * Optional. Stripe level for files. Allowed values are: - * * `FILE_STRIPE_LEVEL_MIN`: offers the best performance for small size - * files. - * * `FILE_STRIPE_LEVEL_BALANCED`: balances performance for workloads - * involving a mix of small and large files. - * * `FILE_STRIPE_LEVEL_MAX`: higher throughput performance for larger files. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.FileStripeLevel file_stripe_level = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setFileStripeLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Parallelstore\V1beta\FileStripeLevel::class); - $this->file_stripe_level = $var; - - return $this; - } - - /** - * Optional. Stripe level for directories. Allowed values are: - * * `DIRECTORY_STRIPE_LEVEL_MIN`: recommended when directories contain a - * small number of files. - * * `DIRECTORY_STRIPE_LEVEL_BALANCED`: balances performance for workloads - * involving a mix of small and large directories. - * * `DIRECTORY_STRIPE_LEVEL_MAX`: recommended for directories with a large - * number of files. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.DirectoryStripeLevel directory_stripe_level = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getDirectoryStripeLevel() - { - return $this->directory_stripe_level; - } - - /** - * Optional. Stripe level for directories. Allowed values are: - * * `DIRECTORY_STRIPE_LEVEL_MIN`: recommended when directories contain a - * small number of files. - * * `DIRECTORY_STRIPE_LEVEL_BALANCED`: balances performance for workloads - * involving a mix of small and large directories. - * * `DIRECTORY_STRIPE_LEVEL_MAX`: recommended for directories with a large - * number of files. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.DirectoryStripeLevel directory_stripe_level = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setDirectoryStripeLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Parallelstore\V1beta\DirectoryStripeLevel::class); - $this->directory_stripe_level = $var; - - return $this; - } - - /** - * Optional. The deployment type of the instance. Allowed values are: - * * `SCRATCH`: the instance is a scratch instance. - * * `PERSISTENT`: the instance is a persistent instance. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.DeploymentType deployment_type = 17 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getDeploymentType() - { - return $this->deployment_type; - } - - /** - * Optional. The deployment type of the instance. Allowed values are: - * * `SCRATCH`: the instance is a scratch instance. - * * `PERSISTENT`: the instance is a persistent instance. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.DeploymentType deployment_type = 17 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setDeploymentType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Parallelstore\V1beta\DeploymentType::class); - $this->deployment_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/Instance/State.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/Instance/State.php deleted file mode 100644 index 354012ed3507..000000000000 --- a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/Instance/State.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.parallelstore.v1beta.Instance.State - */ -class 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 ACTIVE = 2; - */ - const ACTIVE = 2; - /** - * The instance is being deleted. - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - /** - * The instance is not usable. - * - * Generated from protobuf enum FAILED = 4; - */ - const FAILED = 4; - /** - * The instance is being upgraded. - * - * Generated from protobuf enum UPGRADING = 5; - */ - const UPGRADING = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::ACTIVE => 'ACTIVE', - self::DELETING => 'DELETING', - self::FAILED => 'FAILED', - self::UPGRADING => 'UPGRADING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no 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\Parallelstore\V1beta\Instance_State::class); - diff --git a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ListInstancesRequest.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ListInstancesRequest.php deleted file mode 100644 index 7a8b21e383d0..000000000000 --- a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ListInstancesRequest.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.parallelstore.v1beta.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}`. - * To retrieve instance information for all locations, use "-" as the value of - * `{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, the server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Filtering results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The project and location for which to retrieve instance - * information, in the format `projects/{project_id}/locations/{location}`. - * - * To retrieve instance information for all locations, use "-" as the value of - * `{location}`. Please see - * {@see ParallelstoreClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Parallelstore\V1beta\ListInstancesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project and location for which to retrieve instance - * information, in the format `projects/{project_id}/locations/{location}`. - * To retrieve instance information for all locations, use "-" as the value of - * `{location}`. - * @type int $page_size - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, the server will pick an appropriate default. - * @type string $page_token - * Optional. A token identifying a page of results the server should return. - * @type string $filter - * Optional. Filtering results. - * @type string $order_by - * Optional. Hint for how to order the results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Parallelstore\V1Beta\Parallelstore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location for which to retrieve instance - * information, in the format `projects/{project_id}/locations/{location}`. - * To retrieve instance information for all locations, use "-" as the value of - * `{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project and location for which to retrieve instance - * information, in the format `projects/{project_id}/locations/{location}`. - * To retrieve instance information for all locations, use "-" as the value of - * `{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Requested page size. Server may return fewer items than - * requested. 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. Requested page size. Server may return fewer items than - * requested. If unspecified, the server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. Filtering results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filtering results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ListInstancesResponse.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ListInstancesResponse.php deleted file mode 100644 index 771809f64967..000000000000 --- a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/ListInstancesResponse.php +++ /dev/null @@ -1,136 +0,0 @@ -google.cloud.parallelstore.v1beta.ListInstancesResponse - */ -class ListInstancesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Parallelstore instances. - * - * Generated from protobuf field repeated .google.cloud.parallelstore.v1beta.Instance instances = 1; - */ - private $instances; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Parallelstore\V1beta\Instance>|\Google\Protobuf\Internal\RepeatedField $instances - * The list of Parallelstore instances. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Parallelstore\V1Beta\Parallelstore::initOnce(); - parent::__construct($data); - } - - /** - * The list of Parallelstore instances. - * - * Generated from protobuf field repeated .google.cloud.parallelstore.v1beta.Instance instances = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInstances() - { - return $this->instances; - } - - /** - * The list of Parallelstore instances. - * - * Generated from protobuf field repeated .google.cloud.parallelstore.v1beta.Instance instances = 1; - * @param array<\Google\Cloud\Parallelstore\V1beta\Instance>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInstances($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Parallelstore\V1beta\Instance::class); - $this->instances = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/OperationMetadata.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/OperationMetadata.php deleted file mode 100644 index 4c18d216563a..000000000000 --- a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/OperationMetadata.php +++ /dev/null @@ -1,307 +0,0 @@ -google.cloud.parallelstore.v1beta.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target = ''; - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $verb = ''; - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status_message = ''; - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been cancelled successfully - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $requested_cancellation = false; - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time the operation finished running. - * @type string $target - * Output only. Server-defined resource path for the target of the operation. - * @type string $verb - * Output only. Name of the verb executed by the operation. - * @type string $status_message - * Output only. Human-readable status of the operation, if any. - * @type bool $requested_cancellation - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been cancelled successfully - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * @type string $api_version - * Output only. API version used to start the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Parallelstore\V1Beta\Parallelstore::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStatusMessage() - { - return $this->status_message; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStatusMessage($var) - { - GPBUtil::checkString($var, True); - $this->status_message = $var; - - return $this; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been cancelled successfully - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getRequestedCancellation() - { - return $this->requested_cancellation; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been cancelled successfully - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setRequestedCancellation($var) - { - GPBUtil::checkBool($var); - $this->requested_cancellation = $var; - - return $this; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkString($var, True); - $this->api_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/SourceGcsBucket.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/SourceGcsBucket.php deleted file mode 100644 index d75c59be5ee4..000000000000 --- a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/SourceGcsBucket.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.parallelstore.v1beta.SourceGcsBucket - */ -class SourceGcsBucket extends \Google\Protobuf\Internal\Message -{ - /** - * Required. URI to a Cloud Storage bucket in the format: - * `gs:///`. The path inside the bucket is - * optional. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * Required. URI to a Cloud Storage bucket in the format: - * `gs:///`. The path inside the bucket is - * optional. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Parallelstore\V1Beta\Parallelstore::initOnce(); - parent::__construct($data); - } - - /** - * Required. URI to a Cloud Storage bucket in the format: - * `gs:///`. The path inside the bucket is - * optional. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Required. URI to a Cloud Storage bucket in the format: - * `gs:///`. The path inside the bucket is - * optional. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/SourceParallelstore.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/SourceParallelstore.php deleted file mode 100644 index 9d009c92d2a9..000000000000 --- a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/SourceParallelstore.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.parallelstore.v1beta.SourceParallelstore - */ -class SourceParallelstore extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Root directory path to the Paralellstore filesystem, starting - * with `/`. Defaults to `/` if unset. - * - * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $path = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $path - * Optional. Root directory path to the Paralellstore filesystem, starting - * with `/`. Defaults to `/` if unset. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Parallelstore\V1Beta\Parallelstore::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Root directory path to the Paralellstore filesystem, starting - * with `/`. Defaults to `/` if unset. - * - * Generated from protobuf field string path = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Optional. Root directory path to the Paralellstore filesystem, starting - * with `/`. Defaults to `/` if unset. - * - * Generated from protobuf field string path = 1 [(.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/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/TransferCounters.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/TransferCounters.php deleted file mode 100644 index 1f3c823561c5..000000000000 --- a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/TransferCounters.php +++ /dev/null @@ -1,261 +0,0 @@ -google.cloud.parallelstore.v1beta.TransferCounters - */ -class TransferCounters extends \Google\Protobuf\Internal\Message -{ - /** - * Objects found in the data source that are scheduled to be transferred, - * excluding any that are filtered based on object conditions or skipped due - * to sync. - * - * Generated from protobuf field int64 objects_found = 1; - */ - protected $objects_found = 0; - /** - * Bytes found in the data source that are scheduled to be transferred, - * excluding any that are filtered based on object conditions or skipped due - * to sync. - * - * Generated from protobuf field int64 bytes_found = 2; - */ - protected $bytes_found = 0; - /** - * Objects in the data source that are not transferred because they already - * exist in the data destination. - * - * Generated from protobuf field int64 objects_skipped = 3; - */ - protected $objects_skipped = 0; - /** - * Bytes in the data source that are not transferred because they already - * exist in the data destination. - * - * Generated from protobuf field int64 bytes_skipped = 4; - */ - protected $bytes_skipped = 0; - /** - * Objects that are copied to the data destination. - * - * Generated from protobuf field int64 objects_copied = 5; - */ - protected $objects_copied = 0; - /** - * Bytes that are copied to the data destination. - * - * Generated from protobuf field int64 bytes_copied = 6; - */ - protected $bytes_copied = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $objects_found - * Objects found in the data source that are scheduled to be transferred, - * excluding any that are filtered based on object conditions or skipped due - * to sync. - * @type int|string $bytes_found - * Bytes found in the data source that are scheduled to be transferred, - * excluding any that are filtered based on object conditions or skipped due - * to sync. - * @type int|string $objects_skipped - * Objects in the data source that are not transferred because they already - * exist in the data destination. - * @type int|string $bytes_skipped - * Bytes in the data source that are not transferred because they already - * exist in the data destination. - * @type int|string $objects_copied - * Objects that are copied to the data destination. - * @type int|string $bytes_copied - * Bytes that are copied to the data destination. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Parallelstore\V1Beta\Parallelstore::initOnce(); - parent::__construct($data); - } - - /** - * Objects found in the data source that are scheduled to be transferred, - * excluding any that are filtered based on object conditions or skipped due - * to sync. - * - * Generated from protobuf field int64 objects_found = 1; - * @return int|string - */ - public function getObjectsFound() - { - return $this->objects_found; - } - - /** - * Objects found in the data source that are scheduled to be transferred, - * excluding any that are filtered based on object conditions or skipped due - * to sync. - * - * Generated from protobuf field int64 objects_found = 1; - * @param int|string $var - * @return $this - */ - public function setObjectsFound($var) - { - GPBUtil::checkInt64($var); - $this->objects_found = $var; - - return $this; - } - - /** - * Bytes found in the data source that are scheduled to be transferred, - * excluding any that are filtered based on object conditions or skipped due - * to sync. - * - * Generated from protobuf field int64 bytes_found = 2; - * @return int|string - */ - public function getBytesFound() - { - return $this->bytes_found; - } - - /** - * Bytes found in the data source that are scheduled to be transferred, - * excluding any that are filtered based on object conditions or skipped due - * to sync. - * - * Generated from protobuf field int64 bytes_found = 2; - * @param int|string $var - * @return $this - */ - public function setBytesFound($var) - { - GPBUtil::checkInt64($var); - $this->bytes_found = $var; - - return $this; - } - - /** - * Objects in the data source that are not transferred because they already - * exist in the data destination. - * - * Generated from protobuf field int64 objects_skipped = 3; - * @return int|string - */ - public function getObjectsSkipped() - { - return $this->objects_skipped; - } - - /** - * Objects in the data source that are not transferred because they already - * exist in the data destination. - * - * Generated from protobuf field int64 objects_skipped = 3; - * @param int|string $var - * @return $this - */ - public function setObjectsSkipped($var) - { - GPBUtil::checkInt64($var); - $this->objects_skipped = $var; - - return $this; - } - - /** - * Bytes in the data source that are not transferred because they already - * exist in the data destination. - * - * Generated from protobuf field int64 bytes_skipped = 4; - * @return int|string - */ - public function getBytesSkipped() - { - return $this->bytes_skipped; - } - - /** - * Bytes in the data source that are not transferred because they already - * exist in the data destination. - * - * Generated from protobuf field int64 bytes_skipped = 4; - * @param int|string $var - * @return $this - */ - public function setBytesSkipped($var) - { - GPBUtil::checkInt64($var); - $this->bytes_skipped = $var; - - return $this; - } - - /** - * Objects that are copied to the data destination. - * - * Generated from protobuf field int64 objects_copied = 5; - * @return int|string - */ - public function getObjectsCopied() - { - return $this->objects_copied; - } - - /** - * Objects that are copied to the data destination. - * - * Generated from protobuf field int64 objects_copied = 5; - * @param int|string $var - * @return $this - */ - public function setObjectsCopied($var) - { - GPBUtil::checkInt64($var); - $this->objects_copied = $var; - - return $this; - } - - /** - * Bytes that are copied to the data destination. - * - * Generated from protobuf field int64 bytes_copied = 6; - * @return int|string - */ - public function getBytesCopied() - { - return $this->bytes_copied; - } - - /** - * Bytes that are copied to the data destination. - * - * Generated from protobuf field int64 bytes_copied = 6; - * @param int|string $var - * @return $this - */ - public function setBytesCopied($var) - { - GPBUtil::checkInt64($var); - $this->bytes_copied = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/TransferOperationMetadata.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/TransferOperationMetadata.php deleted file mode 100644 index 6a51f19d65e6..000000000000 --- a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/TransferOperationMetadata.php +++ /dev/null @@ -1,261 +0,0 @@ -google.cloud.parallelstore.v1beta.TransferOperationMetadata - */ -class TransferOperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The progress of the transfer operation. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.TransferCounters counters = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $counters = null; - /** - * Output only. The type of transfer occurring. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.TransferType transfer_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $transfer_type = 0; - protected $source; - protected $destination; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Parallelstore\V1beta\SourceParallelstore $source_parallelstore - * Output only. Parallelstore source. - * @type \Google\Cloud\Parallelstore\V1beta\SourceGcsBucket $source_gcs_bucket - * Output only. Cloud Storage source. - * @type \Google\Cloud\Parallelstore\V1beta\DestinationGcsBucket $destination_gcs_bucket - * Output only. Cloud Storage destination. - * @type \Google\Cloud\Parallelstore\V1beta\DestinationParallelstore $destination_parallelstore - * Output only. Parallelstore destination. - * @type \Google\Cloud\Parallelstore\V1beta\TransferCounters $counters - * Output only. The progress of the transfer operation. - * @type int $transfer_type - * Output only. The type of transfer occurring. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Parallelstore\V1Beta\Parallelstore::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Parallelstore source. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.SourceParallelstore source_parallelstore = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Parallelstore\V1beta\SourceParallelstore|null - */ - public function getSourceParallelstore() - { - return $this->readOneof(7); - } - - public function hasSourceParallelstore() - { - return $this->hasOneof(7); - } - - /** - * Output only. Parallelstore source. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.SourceParallelstore source_parallelstore = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Parallelstore\V1beta\SourceParallelstore $var - * @return $this - */ - public function setSourceParallelstore($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1beta\SourceParallelstore::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Output only. Cloud Storage source. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.SourceGcsBucket source_gcs_bucket = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Parallelstore\V1beta\SourceGcsBucket|null - */ - public function getSourceGcsBucket() - { - return $this->readOneof(8); - } - - public function hasSourceGcsBucket() - { - return $this->hasOneof(8); - } - - /** - * Output only. Cloud Storage source. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.SourceGcsBucket source_gcs_bucket = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Parallelstore\V1beta\SourceGcsBucket $var - * @return $this - */ - public function setSourceGcsBucket($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1beta\SourceGcsBucket::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Output only. Cloud Storage destination. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.DestinationGcsBucket destination_gcs_bucket = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Parallelstore\V1beta\DestinationGcsBucket|null - */ - public function getDestinationGcsBucket() - { - return $this->readOneof(9); - } - - public function hasDestinationGcsBucket() - { - return $this->hasOneof(9); - } - - /** - * Output only. Cloud Storage destination. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.DestinationGcsBucket destination_gcs_bucket = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Parallelstore\V1beta\DestinationGcsBucket $var - * @return $this - */ - public function setDestinationGcsBucket($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1beta\DestinationGcsBucket::class); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * Output only. Parallelstore destination. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.DestinationParallelstore destination_parallelstore = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Parallelstore\V1beta\DestinationParallelstore|null - */ - public function getDestinationParallelstore() - { - return $this->readOneof(10); - } - - public function hasDestinationParallelstore() - { - return $this->hasOneof(10); - } - - /** - * Output only. Parallelstore destination. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.DestinationParallelstore destination_parallelstore = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Parallelstore\V1beta\DestinationParallelstore $var - * @return $this - */ - public function setDestinationParallelstore($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1beta\DestinationParallelstore::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * Output only. The progress of the transfer operation. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.TransferCounters counters = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Parallelstore\V1beta\TransferCounters|null - */ - public function getCounters() - { - return $this->counters; - } - - public function hasCounters() - { - return isset($this->counters); - } - - public function clearCounters() - { - unset($this->counters); - } - - /** - * Output only. The progress of the transfer operation. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.TransferCounters counters = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Parallelstore\V1beta\TransferCounters $var - * @return $this - */ - public function setCounters($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1beta\TransferCounters::class); - $this->counters = $var; - - return $this; - } - - /** - * Output only. The type of transfer occurring. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.TransferType transfer_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getTransferType() - { - return $this->transfer_type; - } - - /** - * Output only. The type of transfer occurring. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.TransferType transfer_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setTransferType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Parallelstore\V1beta\TransferType::class); - $this->transfer_type = $var; - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - - /** - * @return string - */ - public function getDestination() - { - return $this->whichOneof("destination"); - } - -} - diff --git a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/TransferType.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/TransferType.php deleted file mode 100644 index 32f4f425911f..000000000000 --- a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/TransferType.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.parallelstore.v1beta.TransferType - */ -class TransferType -{ - /** - * Zero is an illegal value. - * - * Generated from protobuf enum TRANSFER_TYPE_UNSPECIFIED = 0; - */ - const TRANSFER_TYPE_UNSPECIFIED = 0; - /** - * Imports to Parallelstore. - * - * Generated from protobuf enum IMPORT = 1; - */ - const IMPORT = 1; - /** - * Exports from Parallelstore. - * - * Generated from protobuf enum EXPORT = 2; - */ - const EXPORT = 2; - - private static $valueToName = [ - self::TRANSFER_TYPE_UNSPECIFIED => 'TRANSFER_TYPE_UNSPECIFIED', - self::IMPORT => 'IMPORT', - self::EXPORT => 'EXPORT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __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/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/UpdateInstanceRequest.php b/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/UpdateInstanceRequest.php deleted file mode 100644 index 4ef5ca11a7b2..000000000000 --- a/owl-bot-staging/Parallelstore/v1beta/proto/src/Google/Cloud/Parallelstore/V1beta/UpdateInstanceRequest.php +++ /dev/null @@ -1,225 +0,0 @@ -google.cloud.parallelstore.v1beta.UpdateInstanceRequest - */ -class UpdateInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Mask of fields to update. Field mask is used to specify the - * fields to be overwritten in the Instance resource by the update. At least - * one path must be supplied in this field. The fields specified in the - * update_mask are relative to the resource, not the full request. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. The instance to update. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and 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 = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\Parallelstore\V1beta\Instance $instance Required. The instance to update. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. Field mask is used to specify the - * fields to be overwritten in the Instance resource by the update. At least - * one path must be supplied in this field. The fields specified in the - * update_mask are relative to the resource, not the full request. - * - * @return \Google\Cloud\Parallelstore\V1beta\UpdateInstanceRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Parallelstore\V1beta\Instance $instance, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setInstance($instance) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. Field mask is used to specify the - * fields to be overwritten in the Instance resource by the update. At least - * one path must be supplied in this field. The fields specified in the - * update_mask are relative to the resource, not the full request. - * @type \Google\Cloud\Parallelstore\V1beta\Instance $instance - * Required. The instance to update. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and 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\Parallelstore\V1Beta\Parallelstore::initOnce(); - parent::__construct($data); - } - - /** - * Required. Mask of fields to update. Field mask is used to specify the - * fields to be overwritten in the Instance resource by the update. At least - * one path must be supplied in this field. The fields specified in the - * update_mask are relative to the resource, not the full request. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Mask of fields to update. Field mask is used to specify the - * fields to be overwritten in the Instance resource by the update. At least - * one path must be supplied in this field. The fields specified in the - * update_mask are relative to the resource, not the full request. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The instance to update. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Parallelstore\V1beta\Instance|null - */ - public function getInstance() - { - return $this->instance; - } - - public function hasInstance() - { - return isset($this->instance); - } - - public function clearInstance() - { - unset($this->instance); - } - - /** - * Required. The instance to update. - * - * Generated from protobuf field .google.cloud.parallelstore.v1beta.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Parallelstore\V1beta\Instance $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1beta\Instance::class); - $this->instance = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and 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 = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and 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 = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/create_instance.php b/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/create_instance.php deleted file mode 100644 index a167a3c68518..000000000000 --- a/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/create_instance.php +++ /dev/null @@ -1,104 +0,0 @@ -setCapacityGib($instanceCapacityGib); - $request = (new CreateInstanceRequest()) - ->setParent($formattedParent) - ->setInstanceId($instanceId) - ->setInstance($instance); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $parallelstoreClient->createInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ParallelstoreClient::locationName('[PROJECT]', '[LOCATION]'); - $instanceId = '[INSTANCE_ID]'; - $instanceCapacityGib = 0; - - create_instance_sample($formattedParent, $instanceId, $instanceCapacityGib); -} -// [END parallelstore_v1beta_generated_Parallelstore_CreateInstance_sync] diff --git a/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/delete_instance.php b/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/delete_instance.php deleted file mode 100644 index bc9e448eef16..000000000000 --- a/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/delete_instance.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $parallelstoreClient->deleteInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ParallelstoreClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - - delete_instance_sample($formattedName); -} -// [END parallelstore_v1beta_generated_Parallelstore_DeleteInstance_sync] diff --git a/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/export_data.php b/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/export_data.php deleted file mode 100644 index 7ff721f7a80e..000000000000 --- a/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/export_data.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $parallelstoreClient->exportData($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ExportDataResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ParallelstoreClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - - export_data_sample($formattedName); -} -// [END parallelstore_v1beta_generated_Parallelstore_ExportData_sync] diff --git a/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/get_instance.php b/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/get_instance.php deleted file mode 100644 index 4ac319b07fce..000000000000 --- a/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/get_instance.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Instance $response */ - $response = $parallelstoreClient->getInstance($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ParallelstoreClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - - get_instance_sample($formattedName); -} -// [END parallelstore_v1beta_generated_Parallelstore_GetInstance_sync] diff --git a/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/get_location.php b/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/get_location.php deleted file mode 100644 index a20382fc3d3e..000000000000 --- a/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END parallelstore_v1beta_generated_Parallelstore_GetLocation_sync] diff --git a/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/import_data.php b/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/import_data.php deleted file mode 100644 index 2bed07a1b4ba..000000000000 --- a/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/import_data.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $parallelstoreClient->importData($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ImportDataResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ParallelstoreClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - - import_data_sample($formattedName); -} -// [END parallelstore_v1beta_generated_Parallelstore_ImportData_sync] diff --git a/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/list_instances.php b/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/list_instances.php deleted file mode 100644 index 3c500ce1f285..000000000000 --- a/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/list_instances.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $parallelstoreClient->listInstances($request); - - /** @var Instance $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ParallelstoreClient::locationName('[PROJECT]', '[LOCATION]'); - - list_instances_sample($formattedParent); -} -// [END parallelstore_v1beta_generated_Parallelstore_ListInstances_sync] diff --git a/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/list_locations.php b/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/list_locations.php deleted file mode 100644 index 914034ce8fea..000000000000 --- a/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END parallelstore_v1beta_generated_Parallelstore_ListLocations_sync] diff --git a/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/update_instance.php b/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/update_instance.php deleted file mode 100644 index 6d1a4798aee8..000000000000 --- a/owl-bot-staging/Parallelstore/v1beta/samples/V1beta/ParallelstoreClient/update_instance.php +++ /dev/null @@ -1,89 +0,0 @@ -setCapacityGib($instanceCapacityGib); - $request = (new UpdateInstanceRequest()) - ->setUpdateMask($updateMask) - ->setInstance($instance); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $parallelstoreClient->updateInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $instanceCapacityGib = 0; - - update_instance_sample($instanceCapacityGib); -} -// [END parallelstore_v1beta_generated_Parallelstore_UpdateInstance_sync] diff --git a/owl-bot-staging/Parallelstore/v1beta/src/V1beta/Client/ParallelstoreClient.php b/owl-bot-staging/Parallelstore/v1beta/src/V1beta/Client/ParallelstoreClient.php deleted file mode 100644 index 299fd2e539da..000000000000 --- a/owl-bot-staging/Parallelstore/v1beta/src/V1beta/Client/ParallelstoreClient.php +++ /dev/null @@ -1,647 +0,0 @@ - createInstanceAsync(CreateInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteInstanceAsync(DeleteInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface exportDataAsync(ExportDataRequest $request, array $optionalArgs = []) - * @method PromiseInterface getInstanceAsync(GetInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface importDataAsync(ImportDataRequest $request, array $optionalArgs = []) - * @method PromiseInterface listInstancesAsync(ListInstancesRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateInstanceAsync(UpdateInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class ParallelstoreClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.parallelstore.v1beta.Parallelstore'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'parallelstore.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'parallelstore.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/parallelstore_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/parallelstore_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/parallelstore_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/parallelstore_rest_client_config.php', - ], - ], - ]; - } - - /** - * 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; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a address - * resource. - * - * @param string $project - * @param string $region - * @param string $address - * - * @return string The formatted address resource. - * - * @experimental - */ - public static function addressName(string $project, string $region, string $address): string - { - return self::getPathTemplate('address')->render([ - 'project' => $project, - 'region' => $region, - 'address' => $address, - ]); - } - - /** - * 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. - * - * @experimental - */ - public static function instanceName(string $project, string $location, string $instance): string - { - return self::getPathTemplate('instance')->render([ - 'project' => $project, - 'location' => $location, - 'instance' => $instance, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - * - * @experimental - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a network - * resource. - * - * @param string $project - * @param string $network - * - * @return string The formatted network resource. - * - * @experimental - */ - public static function networkName(string $project, string $network): string - { - return self::getPathTemplate('network')->render([ - 'project' => $project, - 'network' => $network, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * service_account resource. - * - * @param string $project - * @param string $serviceAccount - * - * @return string The formatted service_account resource. - * - * @experimental - */ - public static function serviceAccountName(string $project, string $serviceAccount): string - { - return self::getPathTemplate('serviceAccount')->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 - * - address: projects/{project}/regions/{region}/addresses/{address} - * - instance: projects/{project}/locations/{location}/instances/{instance} - * - location: projects/{project}/locations/{location} - * - network: projects/{project}/global/networks/{network} - * - 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. - * - * @experimental - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'parallelstore.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); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a Parallelstore instance in a given project and location. - * - * The async variant is {@see ParallelstoreClient::createInstanceAsync()} . - * - * @example samples/V1beta/ParallelstoreClient/create_instance.php - * - * @param CreateInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function createInstance(CreateInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateInstance', $request, $callOptions)->wait(); - } - - /** - * Deletes a single instance. - * - * The async variant is {@see ParallelstoreClient::deleteInstanceAsync()} . - * - * @example samples/V1beta/ParallelstoreClient/delete_instance.php - * - * @param DeleteInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function deleteInstance(DeleteInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteInstance', $request, $callOptions)->wait(); - } - - /** - * Copies data from Parallelstore to Cloud Storage. - * - * The async variant is {@see ParallelstoreClient::exportDataAsync()} . - * - * @example samples/V1beta/ParallelstoreClient/export_data.php - * - * @param ExportDataRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function exportData(ExportDataRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ExportData', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single instance. - * - * The async variant is {@see ParallelstoreClient::getInstanceAsync()} . - * - * @example samples/V1beta/ParallelstoreClient/get_instance.php - * - * @param GetInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Instance - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function getInstance(GetInstanceRequest $request, array $callOptions = []): Instance - { - return $this->startApiCall('GetInstance', $request, $callOptions)->wait(); - } - - /** - * Copies data from Cloud Storage to Parallelstore. - * - * The async variant is {@see ParallelstoreClient::importDataAsync()} . - * - * @example samples/V1beta/ParallelstoreClient/import_data.php - * - * @param ImportDataRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function importData(ImportDataRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ImportData', $request, $callOptions)->wait(); - } - - /** - * Lists all instances in a given project and location. - * - * The async variant is {@see ParallelstoreClient::listInstancesAsync()} . - * - * @example samples/V1beta/ParallelstoreClient/list_instances.php - * - * @param ListInstancesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function listInstances(ListInstancesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListInstances', $request, $callOptions); - } - - /** - * Updates the parameters of a single instance. - * - * The async variant is {@see ParallelstoreClient::updateInstanceAsync()} . - * - * @example samples/V1beta/ParallelstoreClient/update_instance.php - * - * @param UpdateInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function updateInstance(UpdateInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateInstance', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see ParallelstoreClient::getLocationAsync()} . - * - * @example samples/V1beta/ParallelstoreClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see ParallelstoreClient::listLocationsAsync()} . - * - * @example samples/V1beta/ParallelstoreClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/Parallelstore/v1beta/src/V1beta/gapic_metadata.json b/owl-bot-staging/Parallelstore/v1beta/src/V1beta/gapic_metadata.json deleted file mode 100644 index 7b389692ba7c..000000000000 --- a/owl-bot-staging/Parallelstore/v1beta/src/V1beta/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.parallelstore.v1beta", - "libraryPackage": "Google\\Cloud\\Parallelstore\\V1beta", - "services": { - "Parallelstore": { - "clients": { - "grpc": { - "libraryClient": "ParallelstoreGapicClient", - "rpcs": { - "CreateInstance": { - "methods": [ - "createInstance" - ] - }, - "DeleteInstance": { - "methods": [ - "deleteInstance" - ] - }, - "ExportData": { - "methods": [ - "exportData" - ] - }, - "GetInstance": { - "methods": [ - "getInstance" - ] - }, - "ImportData": { - "methods": [ - "importData" - ] - }, - "ListInstances": { - "methods": [ - "listInstances" - ] - }, - "UpdateInstance": { - "methods": [ - "updateInstance" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Parallelstore/v1beta/src/V1beta/resources/parallelstore_client_config.json b/owl-bot-staging/Parallelstore/v1beta/src/V1beta/resources/parallelstore_client_config.json deleted file mode 100644 index bc53acd55a4a..000000000000 --- a/owl-bot-staging/Parallelstore/v1beta/src/V1beta/resources/parallelstore_client_config.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "interfaces": { - "google.cloud.parallelstore.v1beta.Parallelstore": { - "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": { - "CreateInstance": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteInstance": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ExportData": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetInstance": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ImportData": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListInstances": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateInstance": { - "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" - } - } - } - } -} diff --git a/owl-bot-staging/Parallelstore/v1beta/src/V1beta/resources/parallelstore_descriptor_config.php b/owl-bot-staging/Parallelstore/v1beta/src/V1beta/resources/parallelstore_descriptor_config.php deleted file mode 100644 index 6ff219c559f2..000000000000 --- a/owl-bot-staging/Parallelstore/v1beta/src/V1beta/resources/parallelstore_descriptor_config.php +++ /dev/null @@ -1,197 +0,0 @@ - [ - 'google.cloud.parallelstore.v1beta.Parallelstore' => [ - 'CreateInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Parallelstore\V1beta\Instance', - 'metadataReturnType' => '\Google\Cloud\Parallelstore\V1beta\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Parallelstore\V1beta\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ExportData' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Parallelstore\V1beta\ExportDataResponse', - 'metadataReturnType' => '\Google\Cloud\Parallelstore\V1beta\ExportDataMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ImportData' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Parallelstore\V1beta\ImportDataResponse', - 'metadataReturnType' => '\Google\Cloud\Parallelstore\V1beta\ImportDataMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Parallelstore\V1beta\Instance', - 'metadataReturnType' => '\Google\Cloud\Parallelstore\V1beta\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'instance.name', - 'fieldAccessors' => [ - 'getInstance', - 'getName', - ], - ], - ], - ], - 'GetInstance' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Parallelstore\V1beta\Instance', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListInstances' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getInstances', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Parallelstore\V1beta\ListInstancesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'address' => 'projects/{project}/regions/{region}/addresses/{address}', - 'instance' => 'projects/{project}/locations/{location}/instances/{instance}', - 'location' => 'projects/{project}/locations/{location}', - 'network' => 'projects/{project}/global/networks/{network}', - 'serviceAccount' => 'projects/{project}/serviceAccounts/{service_account}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Parallelstore/v1beta/src/V1beta/resources/parallelstore_rest_client_config.php b/owl-bot-staging/Parallelstore/v1beta/src/V1beta/resources/parallelstore_rest_client_config.php deleted file mode 100644 index f1562b87effb..000000000000 --- a/owl-bot-staging/Parallelstore/v1beta/src/V1beta/resources/parallelstore_rest_client_config.php +++ /dev/null @@ -1,187 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.parallelstore.v1beta.Parallelstore' => [ - 'CreateInstance' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*}/instances', - 'body' => 'instance', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'instance_id', - ], - ], - 'DeleteInstance' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/instances/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ExportData' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/instances/*}:exportData', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetInstance' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/instances/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ImportData' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/instances/*}:importData', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListInstances' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*}/instances', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateInstance' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1beta/{instance.name=projects/*/locations/*/instances/*}', - 'body' => 'instance', - 'placeholders' => [ - 'instance.name' => [ - 'getters' => [ - 'getInstance', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}:cancel', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Parallelstore/v1beta/tests/Unit/V1beta/Client/ParallelstoreClientTest.php b/owl-bot-staging/Parallelstore/v1beta/tests/Unit/V1beta/Client/ParallelstoreClientTest.php deleted file mode 100644 index 3bb333809c18..000000000000 --- a/owl-bot-staging/Parallelstore/v1beta/tests/Unit/V1beta/Client/ParallelstoreClientTest.php +++ /dev/null @@ -1,1100 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ParallelstoreClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ParallelstoreClient($options); - } - - /** @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'; - $capacityGib = 498394811; - $daosVersion = 'daosVersion-1809382982'; - $network = 'network1843485230'; - $reservedIpRange = 'reservedIpRange-1082940580'; - $effectiveReservedIpRange = 'effectiveReservedIpRange-598066492'; - $expectedResponse = new Instance(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setCapacityGib($capacityGib); - $expectedResponse->setDaosVersion($daosVersion); - $expectedResponse->setNetwork($network); - $expectedResponse->setReservedIpRange($reservedIpRange); - $expectedResponse->setEffectiveReservedIpRange($effectiveReservedIpRange); - $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(); - $instanceCapacityGib = 1813257007; - $instance->setCapacityGib($instanceCapacityGib); - $request = (new CreateInstanceRequest()) - ->setParent($formattedParent) - ->setInstanceId($instanceId) - ->setInstance($instance); - $response = $gapicClient->createInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.parallelstore.v1beta.Parallelstore/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(); - $instanceCapacityGib = 1813257007; - $instance->setCapacityGib($instanceCapacityGib); - $request = (new CreateInstanceRequest()) - ->setParent($formattedParent) - ->setInstanceId($instanceId) - ->setInstance($instance); - $response = $gapicClient->createInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createInstanceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteInstanceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new DeleteInstanceRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.parallelstore.v1beta.Parallelstore/DeleteInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteInstanceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteInstanceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new DeleteInstanceRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteInstanceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function exportDataTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/exportDataTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new ExportDataResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/exportDataTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new ExportDataRequest()) - ->setName($formattedName); - $response = $gapicClient->exportData($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.parallelstore.v1beta.Parallelstore/ExportData', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportDataTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function exportDataExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/exportDataTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new ExportDataRequest()) - ->setName($formattedName); - $response = $gapicClient->exportData($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportDataTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getInstanceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $capacityGib = 498394811; - $daosVersion = 'daosVersion-1809382982'; - $network = 'network1843485230'; - $reservedIpRange = 'reservedIpRange-1082940580'; - $effectiveReservedIpRange = 'effectiveReservedIpRange-598066492'; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setCapacityGib($capacityGib); - $expectedResponse->setDaosVersion($daosVersion); - $expectedResponse->setNetwork($network); - $expectedResponse->setReservedIpRange($reservedIpRange); - $expectedResponse->setEffectiveReservedIpRange($effectiveReservedIpRange); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new GetInstanceRequest()) - ->setName($formattedName); - $response = $gapicClient->getInstance($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.parallelstore.v1beta.Parallelstore/GetInstance', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getInstanceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new GetInstanceRequest()) - ->setName($formattedName); - try { - $gapicClient->getInstance($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function importDataTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/importDataTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new ImportDataResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/importDataTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new ImportDataRequest()) - ->setName($formattedName); - $response = $gapicClient->importData($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.parallelstore.v1beta.Parallelstore/ImportData', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importDataTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function importDataExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/importDataTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new ImportDataRequest()) - ->setName($formattedName); - $response = $gapicClient->importData($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importDataTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function listInstancesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $instancesElement = new Instance(); - $instances = [ - $instancesElement, - ]; - $expectedResponse = new ListInstancesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setInstances($instances); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListInstancesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listInstances($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getInstances()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.parallelstore.v1beta.Parallelstore/ListInstances', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listInstancesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListInstancesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listInstances($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function 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'; - $capacityGib = 498394811; - $daosVersion = 'daosVersion-1809382982'; - $network = 'network1843485230'; - $reservedIpRange = 'reservedIpRange-1082940580'; - $effectiveReservedIpRange = 'effectiveReservedIpRange-598066492'; - $expectedResponse = new Instance(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setCapacityGib($capacityGib); - $expectedResponse->setDaosVersion($daosVersion); - $expectedResponse->setNetwork($network); - $expectedResponse->setReservedIpRange($reservedIpRange); - $expectedResponse->setEffectiveReservedIpRange($effectiveReservedIpRange); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $instance = new Instance(); - $instanceCapacityGib = 1813257007; - $instance->setCapacityGib($instanceCapacityGib); - $request = (new UpdateInstanceRequest()) - ->setUpdateMask($updateMask) - ->setInstance($instance); - $response = $gapicClient->updateInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.parallelstore.v1beta.Parallelstore/UpdateInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getInstance(); - $this->assertProtobufEquals($instance, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateInstanceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateInstanceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $instance = new Instance(); - $instanceCapacityGib = 1813257007; - $instance->setCapacityGib($instanceCapacityGib); - $request = (new UpdateInstanceRequest()) - ->setUpdateMask($updateMask) - ->setInstance($instance); - $response = $gapicClient->updateInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateInstanceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createInstanceAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->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'; - $capacityGib = 498394811; - $daosVersion = 'daosVersion-1809382982'; - $network = 'network1843485230'; - $reservedIpRange = 'reservedIpRange-1082940580'; - $effectiveReservedIpRange = 'effectiveReservedIpRange-598066492'; - $expectedResponse = new Instance(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setCapacityGib($capacityGib); - $expectedResponse->setDaosVersion($daosVersion); - $expectedResponse->setNetwork($network); - $expectedResponse->setReservedIpRange($reservedIpRange); - $expectedResponse->setEffectiveReservedIpRange($effectiveReservedIpRange); - $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(); - $instanceCapacityGib = 1813257007; - $instance->setCapacityGib($instanceCapacityGib); - $request = (new CreateInstanceRequest()) - ->setParent($formattedParent) - ->setInstanceId($instanceId) - ->setInstance($instance); - $response = $gapicClient->createInstanceAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.parallelstore.v1beta.Parallelstore/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()); - } -}