From f8761e4a2e66da4591130e35a458b230c926f11b Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 6 Feb 2026 19:09:11 +0000 Subject: [PATCH 1/2] feat: add a DeleteFolderRecursive API definition PiperOrigin-RevId: 866471251 Source-Link: https://github.com/googleapis/googleapis/commit/af8a8d56476983207ac225892b38cc9bfbe744f1 Source-Link: https://github.com/googleapis/googleapis-gen/commit/aab4d11f403e99d8364c34bcd5eda1f8ea00c506 Copy-Tag: eyJwIjoiU3RvcmFnZUNvbnRyb2wvLk93bEJvdC55YW1sIiwiaCI6ImFhYjRkMTFmNDAzZTk5ZDgzNjRjMzRiY2Q1ZWRhMWY4ZWEwMGM1MDYifQ== --- .../Storage/Control/V2/StorageControl.php | Bin 0 -> 17434 bytes .../Storage/Control/V2/AnywhereCache.php | 383 +++ .../V2/CommonLongRunningOperationMetadata.php | 273 ++ .../V2/CreateAnywhereCacheMetadata.php | 274 ++ .../Control/V2/CreateAnywhereCacheRequest.php | 189 ++ .../Control/V2/CreateFolderRequest.php | 280 ++ .../Control/V2/CreateManagedFolderRequest.php | 221 ++ .../V2/DeleteFolderRecursiveMetadata.php | 112 + .../V2/DeleteFolderRecursiveRequest.php | 225 ++ .../Control/V2/DeleteFolderRequest.php | 221 ++ .../Control/V2/DeleteManagedFolderRequest.php | 271 ++ .../V2/DisableAnywhereCacheRequest.php | 128 + .../Cloud/Storage/Control/V2/Folder.php | 258 ++ .../Control/V2/GetAnywhereCacheRequest.php | 124 + .../V2/GetFolderIntelligenceConfigRequest.php | 97 + .../Storage/Control/V2/GetFolderRequest.php | 221 ++ .../Control/V2/GetManagedFolderRequest.php | 225 ++ ...tOrganizationIntelligenceConfigRequest.php | 97 + .../GetProjectIntelligenceConfigRequest.php | 97 + .../Control/V2/GetStorageLayoutRequest.php | 162 ++ .../Storage/Control/V2/IntelligenceConfig.php | 314 +++ .../V2/IntelligenceConfig/EditionConfig.php | 88 + .../EffectiveIntelligenceConfig.php | 116 + .../EffectiveEdition.php | 64 + .../Control/V2/IntelligenceConfig/Filter.php | 188 ++ .../Filter/CloudStorageBuckets.php | 98 + .../Filter/CloudStorageLocations.php | 78 + .../V2/IntelligenceConfig/TrialConfig.php | 80 + .../Control/V2/ListAnywhereCachesRequest.php | 195 ++ .../Control/V2/ListAnywhereCachesResponse.php | 105 + .../Storage/Control/V2/ListFoldersRequest.php | 373 +++ .../Control/V2/ListFoldersResponse.php | 105 + .../Control/V2/ListManagedFoldersRequest.php | 233 ++ .../Control/V2/ListManagedFoldersResponse.php | 105 + .../Storage/Control/V2/ManagedFolder.php | 205 ++ .../Control/V2/PauseAnywhereCacheRequest.php | 128 + .../Storage/Control/V2/PendingRenameInfo.php | 67 + .../Control/V2/RenameFolderMetadata.php | 146 ++ .../Control/V2/RenameFolderRequest.php | 261 ++ .../Control/V2/ResumeAnywhereCacheRequest.php | 128 + .../Storage/Control/V2/StorageLayout.php | 239 ++ .../StorageLayout/CustomPlacementConfig.php | 72 + .../StorageLayout/HierarchicalNamespace.php | 70 + .../V2/UpdateAnywhereCacheMetadata.php | 274 ++ .../Control/V2/UpdateAnywhereCacheRequest.php | 210 ++ .../UpdateFolderIntelligenceConfigRequest.php | 189 ++ ...eOrganizationIntelligenceConfigRequest.php | 189 ++ ...UpdateProjectIntelligenceConfigRequest.php | 189 ++ .../create_anywhere_cache.php | 86 + .../V2/StorageControlClient/create_folder.php | 82 + .../create_managed_folder.php | 77 + .../V2/StorageControlClient/delete_folder.php | 71 + .../delete_folder_recursive.php | 83 + .../delete_managed_folder.php | 75 + .../disable_anywhere_cache.php | 79 + .../get_anywhere_cache.php | 76 + .../V2/StorageControlClient/get_folder.php | 73 + .../get_folder_intelligence_config.php | 74 + .../StorageControlClient/get_iam_policy.php | 75 + .../get_managed_folder.php | 77 + .../get_organization_intelligence_config.php | 74 + .../get_project_intelligence_config.php | 74 + .../get_storage_layout.php | 72 + .../list_anywhere_caches.php | 76 + .../V2/StorageControlClient/list_folders.php | 78 + .../list_managed_folders.php | 76 + .../pause_anywhere_cache.php | 76 + .../V2/StorageControlClient/rename_folder.php | 90 + .../resume_anywhere_cache.php | 76 + .../StorageControlClient/set_iam_policy.php | 77 + .../test_iam_permissions.php | 84 + .../update_anywhere_cache.php | 75 + .../update_folder_intelligence_config.php | 62 + ...pdate_organization_intelligence_config.php | 62 + .../update_project_intelligence_config.php | 62 + .../v2/src/V2/Client/StorageControlClient.php | 1224 +++++++++ .../v2/src/V2/gapic_metadata.json | 153 ++ .../storage_control_client_config.json | 183 ++ .../storage_control_descriptor_config.php | 516 ++++ .../storage_control_rest_client_config.php | 109 + .../V2/Client/StorageControlClientTest.php | 2297 +++++++++++++++++ 81 files changed, 14891 insertions(+) create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/GPBMetadata/Google/Storage/Control/V2/StorageControl.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/AnywhereCache.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CommonLongRunningOperationMetadata.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateAnywhereCacheMetadata.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateAnywhereCacheRequest.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateFolderRequest.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateManagedFolderRequest.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteFolderRecursiveMetadata.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteFolderRecursiveRequest.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteFolderRequest.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteManagedFolderRequest.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DisableAnywhereCacheRequest.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/Folder.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetAnywhereCacheRequest.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetFolderIntelligenceConfigRequest.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetFolderRequest.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetManagedFolderRequest.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetOrganizationIntelligenceConfigRequest.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetProjectIntelligenceConfigRequest.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetStorageLayoutRequest.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/EditionConfig.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/EffectiveIntelligenceConfig.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/EffectiveIntelligenceConfig/EffectiveEdition.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/Filter.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/Filter/CloudStorageBuckets.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/Filter/CloudStorageLocations.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/TrialConfig.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListAnywhereCachesRequest.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListAnywhereCachesResponse.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListFoldersRequest.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListFoldersResponse.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListManagedFoldersRequest.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListManagedFoldersResponse.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ManagedFolder.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/PauseAnywhereCacheRequest.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/PendingRenameInfo.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/RenameFolderMetadata.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/RenameFolderRequest.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ResumeAnywhereCacheRequest.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout/CustomPlacementConfig.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout/HierarchicalNamespace.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateAnywhereCacheMetadata.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateAnywhereCacheRequest.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateFolderIntelligenceConfigRequest.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateOrganizationIntelligenceConfigRequest.php create mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateProjectIntelligenceConfigRequest.php create mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_anywhere_cache.php create mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_folder.php create mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_managed_folder.php create mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/delete_folder.php create mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/delete_folder_recursive.php create mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/delete_managed_folder.php create mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/disable_anywhere_cache.php create mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_anywhere_cache.php create mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_folder.php create mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_folder_intelligence_config.php create mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_iam_policy.php create mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_managed_folder.php create mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_organization_intelligence_config.php create mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_project_intelligence_config.php create mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_storage_layout.php create mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_anywhere_caches.php create mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_folders.php create mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_managed_folders.php create mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/pause_anywhere_cache.php create mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/rename_folder.php create mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/resume_anywhere_cache.php create mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/set_iam_policy.php create mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/test_iam_permissions.php create mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/update_anywhere_cache.php create mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/update_folder_intelligence_config.php create mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/update_organization_intelligence_config.php create mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/update_project_intelligence_config.php create mode 100644 owl-bot-staging/StorageControl/v2/src/V2/Client/StorageControlClient.php create mode 100644 owl-bot-staging/StorageControl/v2/src/V2/gapic_metadata.json create mode 100644 owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_client_config.json create mode 100644 owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_descriptor_config.php create mode 100644 owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_rest_client_config.php create mode 100644 owl-bot-staging/StorageControl/v2/tests/Unit/V2/Client/StorageControlClientTest.php diff --git a/owl-bot-staging/StorageControl/v2/proto/src/GPBMetadata/Google/Storage/Control/V2/StorageControl.php b/owl-bot-staging/StorageControl/v2/proto/src/GPBMetadata/Google/Storage/Control/V2/StorageControl.php new file mode 100644 index 0000000000000000000000000000000000000000..c43fec0a339886db8233f0a9a54591e8f46d3014 GIT binary patch literal 17434 zcmdrUOKcm*HA`ByG>T<;6j?GI+cfPsvMiG@<4;4!X_wTuuq8oOj35w7tjLwL^^(i( zE@jzeolH*YRo&KHy_{UWlXTbgWX-l*t7MtU<@(BsZYN7trDmAA zolYjl=aRE?i^+-cnZ*;Z)UoPzNzWx$Eo;@(GmdN7+Nz!@Syk7z%*=XLJSy@>X$l*m zs#ejRnpV=2Q}g-jx~r8nS6iB*V3uw$FiQmnX6a`33PL4QbDSg};v?uDO2S{QzHAz$ zq~mHX{5xehMWbrChGrUffvKy>70q;X0MR^mrCu$$hE+|H1#{JsK5{0>V3N6~Y8D9L zYEsZOPvinJS(>T3x?R=GrE%RU*+vcMorkHp+^X(+(j-qt&TzB@oUxJ|VKnA)O+;Qz zx^`XnV^1b+-L2czE0k^mVAK1w6d*OVW-O`Iszsz=Rh?XJo2P9MtriwcL$A7>t(i1* zvz*u0v~|O>cd&G(x?**2ZTFuCmsE4rl zl{oGjSRrmuT;_hjCmd;-V1TvrL5?v)z}noT`OvU$oz3i)j~wG8hE~a}pU=R*VvSlS zA5X~R(%4BpW^UVA#`5f}0YQyNxlEZG6CW2WdE+`U7d|L5fH%mbQURmjGla;z8LrSg zn~*w-4$kYUS87_~@AmOj; zCD+N^wzIl7NO%tdn9zb4zPXGt*CfQ&I2;I?_A~5*nXLG!>s# z$jsvi*^Hi|Q647B=*jnftSX;8`0y{?v2G=wK*PmmSQKOa7tomp=; zncrR}seb@p#w($~#mjD5eInrRYF;Np;%A6flGkeePPf zbQW=_#uPjNhGXk1#s&>G{2@Ro>!wjLpp+c$7V1@S5)GL8hEcLsZLPLul!}lYZFiWt z8&&i%bWolF5r&2o4q0}No+jr=Eu#TR8cq%BMIC36hyY;VaR`d-Efo);166&)E&3QI zR^F5PK@1JBI38?lBm_ndA1O3ghS+0NX<<~{b_-8#F&q+NSm1~fVn`$j3^7dnyB1>Z z$I!E~D{_YxrYU@qrM!qy_Dt(2OO!(MpTa`zx$scyrAs9!-V%B4V!VAPhEfHqQn9L} z4qjk&uvZ3)&0%BSCX$Jex6h+)a1WO1S^VuZ)e~7nKm=uod#A=CGIhi_K8X(TETxx= zB@MQhrb#WBW-J=ESL-I=mF%P4Dw#o9j8Fgu(w1pSaHJsjTbR^S0FteiPLXjjg zXfTijC_MUzITeKv9GVV#5+i6Z5F9>$_CayGZ0codg59}$kJJrxszsS9NdcdaQmt}G zOp~L1(pM+DU;3VULqS7OwMuA2Sj|a$g)v&Zo{mUqpO?j%JIHC4*@!3*V%S zgoH5(0*NIt3?-=yreV(_`$}{DkosW^C0O#1pbI92-?FOlvsE^fyqalRw~JNCy|f3y z(s{$CbeAi}-zw-ZDcU9RcsrTLGlJdO(8xM&-jk;`P$Gx}zWY$o0ojCD+Ud|x=B5N_$oLs~R=r(>iI0=1)7t{9F3EiT>-WX+K2I1J~XLAcn2Kfe!k6$#e- zUbLqOxbg$&V6hQQiiqqL+VJ{(ij3OVE{TlBqsJH7PoUqyyT~J|as+vXZWFrj z>1Zm)P??XtZDq9F;hU7b{wZ=l2TTHW~!FyBE5IKZq|J_FS2w2qb} z^+bgIBVM&gn0H*YNKhb>Hnw3Q4mNdQ8w?`AlXzJo0S6Md%MwjW;Ze#G30CW}8A)@eWMLtVmG^u*G9)$@XOB~c@CU@Y;N=H z9CKR1fU^a!0w=S~UBpQ{WW{28s=+oq!r}Y zEIC6Eh^MZj{>G*F1Ufn~IXO{SoVhtsBp1$R=4Okp%-)!vD9lXGOpNzGg}c$7*}2(? zeg!{`x^FD1v*YT*cz-NWK)pWKBr#6ks2MgtyN?#*QYExsikG0agdn3ZH#<2q)j&-z z+BY*hJ+Uye$OsyrxuNE-0iiL8yg2SbU5g7d>b3r^+*`3n>YFiiM#S%iBmL&+g}=m3 zzr3US&5UPynS0{nX2vgYo>#6|_NrDj?y}oOnS1ax`r=$bVJ@%%E#hMk;!#Qaj2I`2 zn<*qG?`K(2JLe;{SqP$bnF}^7R_dPX$gGK_#(dduSL@vm74#hAi#3A3_#FK~L8lo< z^X#_C7oVkDXatT8q8Z+orE`Sy^c>-A2VR`gQOdhn(^_XRGC7PgiOjfV&t_Thbs=j%Gv@o4Z)7fq- zb$UzX`U=#Gp#hc=Nhcx*(WK90rHpIQ_-S(3( zgtEX4N}4Z(zUu*xn}dW5w=oB4vY;%waCaP>fmV8dP{Qxvu&xJ*Zt`?NZ&a{{=j;YBM@d0rMmB^p+CD zQ~*42eh9fh=4PzUu8NaQ1m)~Sd>IYMbJ8SzL?{e?4Hv+In&tRXNGu9kAh-|n7fHN3 z51+pPe`#*Ahx$wN^e0H~FTuV7TJxc?GGP7_q?kufNnh=vr!@J=(n_PJgui|Cl&1@N z!@?Meo{g(IjGiAU=-IFx6Art27q(E)A67s&Zv;~XUTwWjwlkOT1@cPeJrX&t`gRhc z`Ql_o1NuIj_}v&f&cavAogh|2qDh;zJ7n!mWlKG7G&lVH!IQFG%uZ9b1Lo2o+JPu? zQY(u0{xP&?j(EGOW+mXT8?_ucS% zH-MkV&?#mBZP=U)VKWMV9di00sxg$a*TapWL&*f2#E+q$07~`V_{Aw97I@Dxy?&lF zUA#fT@?gUp_SSFe)h)H#=5KY<;%^F0fW0SjA8O1u(7s3XK2UkXM@SQu{=qg>7Pr&` zg32-Wvgqy-`+a!lY7t)AA!5^Qeo4*2UiHZZ+dM@Oex^aZK{I)Fe;=&rnQd;i(NUHj zD6JK6!KZ+c@FtzL%-*VmX5AIvD)COGKMV0gxeT=SD*n66kf28s@5LUfheS6=KJWQR zy&qe1-I|ljWNzQS%?04S;HlN!HFysh4u8+V+XwE7Wmm>Jo1TW(8q4Rbs(GjF!m_?D zh+L_g^qidZbvs!{kQF;cMi!9^;*Bty9}=w0`o6C c@4XQ}#(q)4_X89ye|&<@WIqzIi8c}X9|xg4qyPW_ literal 0 HcmV?d00001 diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/AnywhereCache.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/AnywhereCache.php new file mode 100644 index 000000000000..752a555a8e20 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/AnywhereCache.php @@ -0,0 +1,383 @@ +google.storage.control.v2.AnywhereCache + */ +class AnywhereCache extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. The resource name of this AnywhereCache. + * Format: + * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * Immutable. The zone in which the cache instance is running. For example, + * us-central1-a. + * + * Generated from protobuf field string zone = 10 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $zone = ''; + /** + * Cache entry TTL (ranges between 1h to 7d). This is a cache-level config + * that defines how long a cache entry can live. Default ttl value (24hrs) + * is applied if not specified in the create request. TTL must be in whole + * seconds. + * + * Generated from protobuf field .google.protobuf.Duration ttl = 3; + */ + protected $ttl = null; + /** + * Cache admission policy. Valid policies includes: + * `admit-on-first-miss` and `admit-on-second-miss`. Defaults to + * `admit-on-first-miss`. Default value is applied if not specified in the + * create request. + * + * Generated from protobuf field string admission_policy = 9; + */ + protected $admission_policy = ''; + /** + * Output only. Cache state including RUNNING, CREATING, DISABLED and PAUSED. + * + * Generated from protobuf field string state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = ''; + /** + * Output only. Time when Anywhere cache instance is allocated. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Time when Anywhere cache instance is last updated, including + * creation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. True if there is an active update operation against this cache + * instance. Subsequential update requests will be rejected if this field is + * true. Output only. + * + * Generated from protobuf field bool pending_update = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $pending_update = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Immutable. The resource name of this AnywhereCache. + * Format: + * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` + * @type string $zone + * Immutable. The zone in which the cache instance is running. For example, + * us-central1-a. + * @type \Google\Protobuf\Duration $ttl + * Cache entry TTL (ranges between 1h to 7d). This is a cache-level config + * that defines how long a cache entry can live. Default ttl value (24hrs) + * is applied if not specified in the create request. TTL must be in whole + * seconds. + * @type string $admission_policy + * Cache admission policy. Valid policies includes: + * `admit-on-first-miss` and `admit-on-second-miss`. Defaults to + * `admit-on-first-miss`. Default value is applied if not specified in the + * create request. + * @type string $state + * Output only. Cache state including RUNNING, CREATING, DISABLED and PAUSED. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Time when Anywhere cache instance is allocated. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Time when Anywhere cache instance is last updated, including + * creation. + * @type bool $pending_update + * Output only. True if there is an active update operation against this cache + * instance. Subsequential update requests will be rejected if this field is + * true. Output only. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. The resource name of this AnywhereCache. + * Format: + * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Immutable. The resource name of this AnywhereCache. + * Format: + * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Immutable. The zone in which the cache instance is running. For example, + * us-central1-a. + * + * Generated from protobuf field string zone = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * Immutable. The zone in which the cache instance is running. For example, + * us-central1-a. + * + * Generated from protobuf field string zone = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + + /** + * Cache entry TTL (ranges between 1h to 7d). This is a cache-level config + * that defines how long a cache entry can live. Default ttl value (24hrs) + * is applied if not specified in the create request. TTL must be in whole + * seconds. + * + * Generated from protobuf field .google.protobuf.Duration ttl = 3; + * @return \Google\Protobuf\Duration|null + */ + public function getTtl() + { + return $this->ttl; + } + + public function hasTtl() + { + return isset($this->ttl); + } + + public function clearTtl() + { + unset($this->ttl); + } + + /** + * Cache entry TTL (ranges between 1h to 7d). This is a cache-level config + * that defines how long a cache entry can live. Default ttl value (24hrs) + * is applied if not specified in the create request. TTL must be in whole + * seconds. + * + * Generated from protobuf field .google.protobuf.Duration ttl = 3; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTtl($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->ttl = $var; + + return $this; + } + + /** + * Cache admission policy. Valid policies includes: + * `admit-on-first-miss` and `admit-on-second-miss`. Defaults to + * `admit-on-first-miss`. Default value is applied if not specified in the + * create request. + * + * Generated from protobuf field string admission_policy = 9; + * @return string + */ + public function getAdmissionPolicy() + { + return $this->admission_policy; + } + + /** + * Cache admission policy. Valid policies includes: + * `admit-on-first-miss` and `admit-on-second-miss`. Defaults to + * `admit-on-first-miss`. Default value is applied if not specified in the + * create request. + * + * Generated from protobuf field string admission_policy = 9; + * @param string $var + * @return $this + */ + public function setAdmissionPolicy($var) + { + GPBUtil::checkString($var, True); + $this->admission_policy = $var; + + return $this; + } + + /** + * Output only. Cache state including RUNNING, CREATING, DISABLED and PAUSED. + * + * Generated from protobuf field string state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Cache state including RUNNING, CREATING, DISABLED and PAUSED. + * + * Generated from protobuf field string state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkString($var, True); + $this->state = $var; + + return $this; + } + + /** + * Output only. Time when Anywhere cache instance is allocated. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Time when Anywhere cache instance is allocated. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Time when Anywhere cache instance is last updated, including + * creation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. Time when Anywhere cache instance is last updated, including + * creation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. True if there is an active update operation against this cache + * instance. Subsequential update requests will be rejected if this field is + * true. Output only. + * + * Generated from protobuf field bool pending_update = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getPendingUpdate() + { + return $this->pending_update; + } + + /** + * Output only. True if there is an active update operation against this cache + * instance. Subsequential update requests will be rejected if this field is + * true. Output only. + * + * Generated from protobuf field bool pending_update = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setPendingUpdate($var) + { + GPBUtil::checkBool($var); + $this->pending_update = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CommonLongRunningOperationMetadata.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CommonLongRunningOperationMetadata.php new file mode 100644 index 000000000000..67e1c36d73d3 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CommonLongRunningOperationMetadata.php @@ -0,0 +1,273 @@ +google.storage.control.v2.CommonLongRunningOperationMetadata + */ +class CommonLongRunningOperationMetadata 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. The time the operation was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The type of operation invoked. + * + * Generated from protobuf field string type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $type = ''; + /** + * Output only. Identifies whether the user has requested cancellation. + * + * Generated from protobuf field bool requested_cancellation = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $requested_cancellation = false; + /** + * Output only. The estimated progress of the operation in percentage [0, + * 100]. The value -1 means the progress is unknown. + * + * Generated from protobuf field int32 progress_percent = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $progress_percent = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time the operation finished running. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time the operation was last modified. + * @type string $type + * Output only. The type of operation invoked. + * @type bool $requested_cancellation + * Output only. Identifies whether the user has requested cancellation. + * @type int $progress_percent + * Output only. The estimated progress of the operation in percentage [0, + * 100]. The value -1 means the progress is unknown. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::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. The time the operation was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The time the operation was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. The type of operation invoked. + * + * Generated from protobuf field string type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Output only. The type of operation invoked. + * + * Generated from protobuf field string type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * Output only. Identifies whether the user has requested cancellation. + * + * Generated from protobuf field bool requested_cancellation = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRequestedCancellation() + { + return $this->requested_cancellation; + } + + /** + * Output only. Identifies whether the user has requested cancellation. + * + * Generated from protobuf field bool requested_cancellation = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRequestedCancellation($var) + { + GPBUtil::checkBool($var); + $this->requested_cancellation = $var; + + return $this; + } + + /** + * Output only. The estimated progress of the operation in percentage [0, + * 100]. The value -1 means the progress is unknown. + * + * Generated from protobuf field int32 progress_percent = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getProgressPercent() + { + return $this->progress_percent; + } + + /** + * Output only. The estimated progress of the operation in percentage [0, + * 100]. The value -1 means the progress is unknown. + * + * Generated from protobuf field int32 progress_percent = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setProgressPercent($var) + { + GPBUtil::checkInt32($var); + $this->progress_percent = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateAnywhereCacheMetadata.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateAnywhereCacheMetadata.php new file mode 100644 index 000000000000..83efefe45254 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateAnywhereCacheMetadata.php @@ -0,0 +1,274 @@ +google.storage.control.v2.CreateAnywhereCacheMetadata + */ +class CreateAnywhereCacheMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Generic metadata for the long running operation. + * + * Generated from protobuf field .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + */ + protected $common_metadata = null; + /** + * Anywhere Cache ID. + * + * Generated from protobuf field optional string anywhere_cache_id = 2; + */ + protected $anywhere_cache_id = null; + /** + * The zone in which the cache instance is running. For example, + * us-central1-a. + * + * Generated from protobuf field optional string zone = 6; + */ + protected $zone = null; + /** + * Anywhere Cache entry's TTL. A cache-level config that is applied to all new + * cache entries on admission. Default ttl value (24hrs) is applied if not + * specified in the create request. + * + * Generated from protobuf field optional .google.protobuf.Duration ttl = 3; + */ + protected $ttl = null; + /** + * Anywhere Cache entry Admission Policy in kebab-case (e.g., + * "admit-on-first-miss"). Default admission policy (admit-on-first-miss) is + * applied if not specified in the create request. + * + * Generated from protobuf field optional string admission_policy = 5; + */ + protected $admission_policy = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata $common_metadata + * Generic metadata for the long running operation. + * @type string $anywhere_cache_id + * Anywhere Cache ID. + * @type string $zone + * The zone in which the cache instance is running. For example, + * us-central1-a. + * @type \Google\Protobuf\Duration $ttl + * Anywhere Cache entry's TTL. A cache-level config that is applied to all new + * cache entries on admission. Default ttl value (24hrs) is applied if not + * specified in the create request. + * @type string $admission_policy + * Anywhere Cache entry Admission Policy in kebab-case (e.g., + * "admit-on-first-miss"). Default admission policy (admit-on-first-miss) is + * applied if not specified in the create request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Generic metadata for the long running operation. + * + * Generated from protobuf field .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + * @return \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata|null + */ + public function getCommonMetadata() + { + return $this->common_metadata; + } + + public function hasCommonMetadata() + { + return isset($this->common_metadata); + } + + public function clearCommonMetadata() + { + unset($this->common_metadata); + } + + /** + * Generic metadata for the long running operation. + * + * Generated from protobuf field .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + * @param \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata $var + * @return $this + */ + public function setCommonMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata::class); + $this->common_metadata = $var; + + return $this; + } + + /** + * Anywhere Cache ID. + * + * Generated from protobuf field optional string anywhere_cache_id = 2; + * @return string + */ + public function getAnywhereCacheId() + { + return isset($this->anywhere_cache_id) ? $this->anywhere_cache_id : ''; + } + + public function hasAnywhereCacheId() + { + return isset($this->anywhere_cache_id); + } + + public function clearAnywhereCacheId() + { + unset($this->anywhere_cache_id); + } + + /** + * Anywhere Cache ID. + * + * Generated from protobuf field optional string anywhere_cache_id = 2; + * @param string $var + * @return $this + */ + public function setAnywhereCacheId($var) + { + GPBUtil::checkString($var, True); + $this->anywhere_cache_id = $var; + + return $this; + } + + /** + * The zone in which the cache instance is running. For example, + * us-central1-a. + * + * Generated from protobuf field optional string zone = 6; + * @return string + */ + public function getZone() + { + return isset($this->zone) ? $this->zone : ''; + } + + public function hasZone() + { + return isset($this->zone); + } + + public function clearZone() + { + unset($this->zone); + } + + /** + * The zone in which the cache instance is running. For example, + * us-central1-a. + * + * Generated from protobuf field optional string zone = 6; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + + /** + * Anywhere Cache entry's TTL. A cache-level config that is applied to all new + * cache entries on admission. Default ttl value (24hrs) is applied if not + * specified in the create request. + * + * Generated from protobuf field optional .google.protobuf.Duration ttl = 3; + * @return \Google\Protobuf\Duration|null + */ + public function getTtl() + { + return $this->ttl; + } + + public function hasTtl() + { + return isset($this->ttl); + } + + public function clearTtl() + { + unset($this->ttl); + } + + /** + * Anywhere Cache entry's TTL. A cache-level config that is applied to all new + * cache entries on admission. Default ttl value (24hrs) is applied if not + * specified in the create request. + * + * Generated from protobuf field optional .google.protobuf.Duration ttl = 3; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTtl($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->ttl = $var; + + return $this; + } + + /** + * Anywhere Cache entry Admission Policy in kebab-case (e.g., + * "admit-on-first-miss"). Default admission policy (admit-on-first-miss) is + * applied if not specified in the create request. + * + * Generated from protobuf field optional string admission_policy = 5; + * @return string + */ + public function getAdmissionPolicy() + { + return isset($this->admission_policy) ? $this->admission_policy : ''; + } + + public function hasAdmissionPolicy() + { + return isset($this->admission_policy); + } + + public function clearAdmissionPolicy() + { + unset($this->admission_policy); + } + + /** + * Anywhere Cache entry Admission Policy in kebab-case (e.g., + * "admit-on-first-miss"). Default admission policy (admit-on-first-miss) is + * applied if not specified in the create request. + * + * Generated from protobuf field optional string admission_policy = 5; + * @param string $var + * @return $this + */ + public function setAdmissionPolicy($var) + { + GPBUtil::checkString($var, True); + $this->admission_policy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateAnywhereCacheRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateAnywhereCacheRequest.php new file mode 100644 index 000000000000..53070b22a41e --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateAnywhereCacheRequest.php @@ -0,0 +1,189 @@ +google.storage.control.v2.CreateAnywhereCacheRequest + */ +class CreateAnywhereCacheRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The bucket to which this cache belongs. + * Format: `projects/{project}/buckets/{bucket}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Properties of the Anywhere Cache instance being created. + * The parent bucket name is specified in the `parent` field. Server uses the + * default value of `ttl` or `admission_policy` if not specified in + * request. + * + * Generated from protobuf field .google.storage.control.v2.AnywhereCache anywhere_cache = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $anywhere_cache = null; + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. This request is only + * idempotent if a `request_id` is provided. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The bucket to which this cache belongs. + * Format: `projects/{project}/buckets/{bucket}` + * Please see {@see StorageControlClient::bucketName()} for help formatting this field. + * @param \Google\Cloud\Storage\Control\V2\AnywhereCache $anywhereCache Required. Properties of the Anywhere Cache instance being created. + * The parent bucket name is specified in the `parent` field. Server uses the + * default value of `ttl` or `admission_policy` if not specified in + * request. + * + * @return \Google\Cloud\Storage\Control\V2\CreateAnywhereCacheRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Storage\Control\V2\AnywhereCache $anywhereCache): self + { + return (new self()) + ->setParent($parent) + ->setAnywhereCache($anywhereCache); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The bucket to which this cache belongs. + * Format: `projects/{project}/buckets/{bucket}` + * @type \Google\Cloud\Storage\Control\V2\AnywhereCache $anywhere_cache + * Required. Properties of the Anywhere Cache instance being created. + * The parent bucket name is specified in the `parent` field. Server uses the + * default value of `ttl` or `admission_policy` if not specified in + * request. + * @type string $request_id + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. This request is only + * idempotent if a `request_id` is provided. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. The bucket to which this cache belongs. + * Format: `projects/{project}/buckets/{bucket}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The bucket to which this cache belongs. + * Format: `projects/{project}/buckets/{bucket}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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. Properties of the Anywhere Cache instance being created. + * The parent bucket name is specified in the `parent` field. Server uses the + * default value of `ttl` or `admission_policy` if not specified in + * request. + * + * Generated from protobuf field .google.storage.control.v2.AnywhereCache anywhere_cache = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Storage\Control\V2\AnywhereCache|null + */ + public function getAnywhereCache() + { + return $this->anywhere_cache; + } + + public function hasAnywhereCache() + { + return isset($this->anywhere_cache); + } + + public function clearAnywhereCache() + { + unset($this->anywhere_cache); + } + + /** + * Required. Properties of the Anywhere Cache instance being created. + * The parent bucket name is specified in the `parent` field. Server uses the + * default value of `ttl` or `admission_policy` if not specified in + * request. + * + * Generated from protobuf field .google.storage.control.v2.AnywhereCache anywhere_cache = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Storage\Control\V2\AnywhereCache $var + * @return $this + */ + public function setAnywhereCache($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\AnywhereCache::class); + $this->anywhere_cache = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. This request is only + * idempotent if a `request_id` is provided. + * + * 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. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. This request is only + * idempotent if a `request_id` is provided. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateFolderRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateFolderRequest.php new file mode 100644 index 000000000000..fa07c167ad9d --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateFolderRequest.php @@ -0,0 +1,280 @@ +google.storage.control.v2.CreateFolderRequest + */ +class CreateFolderRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the bucket in which the folder will reside. The bucket + * must be a hierarchical namespace enabled bucket. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Properties of the new folder being created. + * The bucket and name of the folder are specified in the parent and folder_id + * fields, respectively. Populating those fields in `folder` will result in an + * error. + * + * Generated from protobuf field .google.storage.control.v2.Folder folder = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $folder = null; + /** + * Required. The full name of a folder, including all its parent folders. + * Folders use single '/' characters as a delimiter. + * The folder_id must end with a slash. + * For example, the folder_id of "books/biographies/" would create a new + * "biographies/" folder under the "books/" folder. + * + * Generated from protobuf field string folder_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $folder_id = ''; + /** + * Optional. If true, parent folder doesn't have to be present and all missing + * ancestor folders will be created atomically. + * + * Generated from protobuf field bool recursive = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $recursive = false; + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $parent Required. Name of the bucket in which the folder will reside. The bucket + * must be a hierarchical namespace enabled bucket. Please see + * {@see StorageControlClient::bucketName()} for help formatting this field. + * @param \Google\Cloud\Storage\Control\V2\Folder $folder Required. Properties of the new folder being created. + * The bucket and name of the folder are specified in the parent and folder_id + * fields, respectively. Populating those fields in `folder` will result in an + * error. + * @param string $folderId Required. The full name of a folder, including all its parent folders. + * Folders use single '/' characters as a delimiter. + * The folder_id must end with a slash. + * For example, the folder_id of "books/biographies/" would create a new + * "biographies/" folder under the "books/" folder. + * + * @return \Google\Cloud\Storage\Control\V2\CreateFolderRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Storage\Control\V2\Folder $folder, string $folderId): self + { + return (new self()) + ->setParent($parent) + ->setFolder($folder) + ->setFolderId($folderId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Name of the bucket in which the folder will reside. The bucket + * must be a hierarchical namespace enabled bucket. + * @type \Google\Cloud\Storage\Control\V2\Folder $folder + * Required. Properties of the new folder being created. + * The bucket and name of the folder are specified in the parent and folder_id + * fields, respectively. Populating those fields in `folder` will result in an + * error. + * @type string $folder_id + * Required. The full name of a folder, including all its parent folders. + * Folders use single '/' characters as a delimiter. + * The folder_id must end with a slash. + * For example, the folder_id of "books/biographies/" would create a new + * "biographies/" folder under the "books/" folder. + * @type bool $recursive + * Optional. If true, parent folder doesn't have to be present and all missing + * ancestor folders will be created atomically. + * @type string $request_id + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the bucket in which the folder will reside. The bucket + * must be a hierarchical namespace enabled bucket. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Name of the bucket in which the folder will reside. The bucket + * must be a hierarchical namespace enabled bucket. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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. Properties of the new folder being created. + * The bucket and name of the folder are specified in the parent and folder_id + * fields, respectively. Populating those fields in `folder` will result in an + * error. + * + * Generated from protobuf field .google.storage.control.v2.Folder folder = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Storage\Control\V2\Folder|null + */ + public function getFolder() + { + return $this->folder; + } + + public function hasFolder() + { + return isset($this->folder); + } + + public function clearFolder() + { + unset($this->folder); + } + + /** + * Required. Properties of the new folder being created. + * The bucket and name of the folder are specified in the parent and folder_id + * fields, respectively. Populating those fields in `folder` will result in an + * error. + * + * Generated from protobuf field .google.storage.control.v2.Folder folder = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Storage\Control\V2\Folder $var + * @return $this + */ + public function setFolder($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\Folder::class); + $this->folder = $var; + + return $this; + } + + /** + * Required. The full name of a folder, including all its parent folders. + * Folders use single '/' characters as a delimiter. + * The folder_id must end with a slash. + * For example, the folder_id of "books/biographies/" would create a new + * "biographies/" folder under the "books/" folder. + * + * Generated from protobuf field string folder_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getFolderId() + { + return $this->folder_id; + } + + /** + * Required. The full name of a folder, including all its parent folders. + * Folders use single '/' characters as a delimiter. + * The folder_id must end with a slash. + * For example, the folder_id of "books/biographies/" would create a new + * "biographies/" folder under the "books/" folder. + * + * Generated from protobuf field string folder_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setFolderId($var) + { + GPBUtil::checkString($var, True); + $this->folder_id = $var; + + return $this; + } + + /** + * Optional. If true, parent folder doesn't have to be present and all missing + * ancestor folders will be created atomically. + * + * Generated from protobuf field bool recursive = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getRecursive() + { + return $this->recursive; + } + + /** + * Optional. If true, parent folder doesn't have to be present and all missing + * ancestor folders will be created atomically. + * + * Generated from protobuf field bool recursive = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setRecursive($var) + { + GPBUtil::checkBool($var); + $this->recursive = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateManagedFolderRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateManagedFolderRequest.php new file mode 100644 index 000000000000..e5320e9019f0 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateManagedFolderRequest.php @@ -0,0 +1,221 @@ +google.storage.control.v2.CreateManagedFolderRequest + */ +class CreateManagedFolderRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the bucket this managed folder belongs to. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Properties of the managed folder being created. + * The bucket and managed folder names are specified in the `parent` and + * `managed_folder_id` fields. Populating these fields in `managed_folder` + * will result in an error. + * + * Generated from protobuf field .google.storage.control.v2.ManagedFolder managed_folder = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $managed_folder = null; + /** + * Required. The name of the managed folder. It uses a single `/` as delimiter + * and leading and trailing `/` are allowed. + * + * Generated from protobuf field string managed_folder_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $managed_folder_id = ''; + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $parent Required. Name of the bucket this managed folder belongs to. Please see + * {@see StorageControlClient::bucketName()} for help formatting this field. + * @param \Google\Cloud\Storage\Control\V2\ManagedFolder $managedFolder Required. Properties of the managed folder being created. + * The bucket and managed folder names are specified in the `parent` and + * `managed_folder_id` fields. Populating these fields in `managed_folder` + * will result in an error. + * @param string $managedFolderId Required. The name of the managed folder. It uses a single `/` as delimiter + * and leading and trailing `/` are allowed. + * + * @return \Google\Cloud\Storage\Control\V2\CreateManagedFolderRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Storage\Control\V2\ManagedFolder $managedFolder, string $managedFolderId): self + { + return (new self()) + ->setParent($parent) + ->setManagedFolder($managedFolder) + ->setManagedFolderId($managedFolderId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Name of the bucket this managed folder belongs to. + * @type \Google\Cloud\Storage\Control\V2\ManagedFolder $managed_folder + * Required. Properties of the managed folder being created. + * The bucket and managed folder names are specified in the `parent` and + * `managed_folder_id` fields. Populating these fields in `managed_folder` + * will result in an error. + * @type string $managed_folder_id + * Required. The name of the managed folder. It uses a single `/` as delimiter + * and leading and trailing `/` are allowed. + * @type string $request_id + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the bucket this managed folder belongs to. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Name of the bucket this managed folder belongs to. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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. Properties of the managed folder being created. + * The bucket and managed folder names are specified in the `parent` and + * `managed_folder_id` fields. Populating these fields in `managed_folder` + * will result in an error. + * + * Generated from protobuf field .google.storage.control.v2.ManagedFolder managed_folder = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Storage\Control\V2\ManagedFolder|null + */ + public function getManagedFolder() + { + return $this->managed_folder; + } + + public function hasManagedFolder() + { + return isset($this->managed_folder); + } + + public function clearManagedFolder() + { + unset($this->managed_folder); + } + + /** + * Required. Properties of the managed folder being created. + * The bucket and managed folder names are specified in the `parent` and + * `managed_folder_id` fields. Populating these fields in `managed_folder` + * will result in an error. + * + * Generated from protobuf field .google.storage.control.v2.ManagedFolder managed_folder = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Storage\Control\V2\ManagedFolder $var + * @return $this + */ + public function setManagedFolder($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\ManagedFolder::class); + $this->managed_folder = $var; + + return $this; + } + + /** + * Required. The name of the managed folder. It uses a single `/` as delimiter + * and leading and trailing `/` are allowed. + * + * Generated from protobuf field string managed_folder_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getManagedFolderId() + { + return $this->managed_folder_id; + } + + /** + * Required. The name of the managed folder. It uses a single `/` as delimiter + * and leading and trailing `/` are allowed. + * + * Generated from protobuf field string managed_folder_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setManagedFolderId($var) + { + GPBUtil::checkString($var, True); + $this->managed_folder_id = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * 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. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteFolderRecursiveMetadata.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteFolderRecursiveMetadata.php new file mode 100644 index 000000000000..12efca222871 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteFolderRecursiveMetadata.php @@ -0,0 +1,112 @@ +google.storage.control.v2.DeleteFolderRecursiveMetadata + */ +class DeleteFolderRecursiveMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Generic metadata for the long running operation. + * + * Generated from protobuf field .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + */ + protected $common_metadata = null; + /** + * The path of the folder recursively deleted. + * + * Generated from protobuf field string folder_id = 2; + */ + protected $folder_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata $common_metadata + * Generic metadata for the long running operation. + * @type string $folder_id + * The path of the folder recursively deleted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Generic metadata for the long running operation. + * + * Generated from protobuf field .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + * @return \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata|null + */ + public function getCommonMetadata() + { + return $this->common_metadata; + } + + public function hasCommonMetadata() + { + return isset($this->common_metadata); + } + + public function clearCommonMetadata() + { + unset($this->common_metadata); + } + + /** + * Generic metadata for the long running operation. + * + * Generated from protobuf field .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + * @param \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata $var + * @return $this + */ + public function setCommonMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata::class); + $this->common_metadata = $var; + + return $this; + } + + /** + * The path of the folder recursively deleted. + * + * Generated from protobuf field string folder_id = 2; + * @return string + */ + public function getFolderId() + { + return $this->folder_id; + } + + /** + * The path of the folder recursively deleted. + * + * Generated from protobuf field string folder_id = 2; + * @param string $var + * @return $this + */ + public function setFolderId($var) + { + GPBUtil::checkString($var, True); + $this->folder_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteFolderRecursiveRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteFolderRecursiveRequest.php new file mode 100644 index 000000000000..272d1b137632 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteFolderRecursiveRequest.php @@ -0,0 +1,225 @@ +google.storage.control.v2.DeleteFolderRecursiveRequest + */ +class DeleteFolderRecursiveRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the folder being deleted, however all of its contents + * will be deleted too. Format: + * `projects/{project}/buckets/{bucket}/folders/{folder}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. Makes the operation only succeed conditional on whether the root + * folder's current metageneration matches the given value. + * + * Generated from protobuf field optional int64 if_metageneration_match = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $if_metageneration_match = null; + /** + * Optional. Makes the operation only succeed conditional on whether the root + * folder's current metageneration does not match the given value. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $if_metageneration_not_match = null; + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the folder being deleted, however all of its contents + * will be deleted too. Format: + * `projects/{project}/buckets/{bucket}/folders/{folder}` + * Please see {@see StorageControlClient::folderName()} for help formatting this field. + * + * @return \Google\Cloud\Storage\Control\V2\DeleteFolderRecursiveRequest + * + * @experimental + */ + public static function 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 folder being deleted, however all of its contents + * will be deleted too. Format: + * `projects/{project}/buckets/{bucket}/folders/{folder}` + * @type int|string $if_metageneration_match + * Optional. Makes the operation only succeed conditional on whether the root + * folder's current metageneration matches the given value. + * @type int|string $if_metageneration_not_match + * Optional. Makes the operation only succeed conditional on whether the root + * folder's current metageneration does not match the given value. + * @type string $request_id + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the folder being deleted, however all of its contents + * will be deleted too. Format: + * `projects/{project}/buckets/{bucket}/folders/{folder}` + * + * Generated 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 folder being deleted, however all of its contents + * will be deleted too. Format: + * `projects/{project}/buckets/{bucket}/folders/{folder}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_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. Makes the operation only succeed conditional on whether the root + * folder's current metageneration matches the given value. + * + * Generated from protobuf field optional int64 if_metageneration_match = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getIfMetagenerationMatch() + { + return isset($this->if_metageneration_match) ? $this->if_metageneration_match : 0; + } + + public function hasIfMetagenerationMatch() + { + return isset($this->if_metageneration_match); + } + + public function clearIfMetagenerationMatch() + { + unset($this->if_metageneration_match); + } + + /** + * Optional. Makes the operation only succeed conditional on whether the root + * folder's current metageneration matches the given value. + * + * Generated from protobuf field optional int64 if_metageneration_match = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setIfMetagenerationMatch($var) + { + GPBUtil::checkInt64($var); + $this->if_metageneration_match = $var; + + return $this; + } + + /** + * Optional. Makes the operation only succeed conditional on whether the root + * folder's current metageneration does not match the given value. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getIfMetagenerationNotMatch() + { + return isset($this->if_metageneration_not_match) ? $this->if_metageneration_not_match : 0; + } + + public function hasIfMetagenerationNotMatch() + { + return isset($this->if_metageneration_not_match); + } + + public function clearIfMetagenerationNotMatch() + { + unset($this->if_metageneration_not_match); + } + + /** + * Optional. Makes the operation only succeed conditional on whether the root + * folder's current metageneration does not match the given value. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setIfMetagenerationNotMatch($var) + { + GPBUtil::checkInt64($var); + $this->if_metageneration_not_match = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * 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. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteFolderRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteFolderRequest.php new file mode 100644 index 000000000000..a3523693513e --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteFolderRequest.php @@ -0,0 +1,221 @@ +google.storage.control.v2.DeleteFolderRequest + */ +class DeleteFolderRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * + * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Makes the operation only succeed conditional on whether the folder's + * current metageneration matches the given value. + * + * Generated from protobuf field optional int64 if_metageneration_match = 3; + */ + protected $if_metageneration_match = null; + /** + * Makes the operation only succeed conditional on whether the folder's + * current metageneration does not match the given value. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 4; + */ + protected $if_metageneration_not_match = null; + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * Please see {@see StorageControlClient::folderName()} for help formatting this field. + * + * @return \Google\Cloud\Storage\Control\V2\DeleteFolderRequest + * + * @experimental + */ + public static function 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 folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * @type int|string $if_metageneration_match + * Makes the operation only succeed conditional on whether the folder's + * current metageneration matches the given value. + * @type int|string $if_metageneration_not_match + * Makes the operation only succeed conditional on whether the folder's + * current metageneration does not match the given value. + * @type string $request_id + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * + * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * + * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Makes the operation only succeed conditional on whether the folder's + * current metageneration matches the given value. + * + * Generated from protobuf field optional int64 if_metageneration_match = 3; + * @return int|string + */ + public function getIfMetagenerationMatch() + { + return isset($this->if_metageneration_match) ? $this->if_metageneration_match : 0; + } + + public function hasIfMetagenerationMatch() + { + return isset($this->if_metageneration_match); + } + + public function clearIfMetagenerationMatch() + { + unset($this->if_metageneration_match); + } + + /** + * Makes the operation only succeed conditional on whether the folder's + * current metageneration matches the given value. + * + * Generated from protobuf field optional int64 if_metageneration_match = 3; + * @param int|string $var + * @return $this + */ + public function setIfMetagenerationMatch($var) + { + GPBUtil::checkInt64($var); + $this->if_metageneration_match = $var; + + return $this; + } + + /** + * Makes the operation only succeed conditional on whether the folder's + * current metageneration does not match the given value. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 4; + * @return int|string + */ + public function getIfMetagenerationNotMatch() + { + return isset($this->if_metageneration_not_match) ? $this->if_metageneration_not_match : 0; + } + + public function hasIfMetagenerationNotMatch() + { + return isset($this->if_metageneration_not_match); + } + + public function clearIfMetagenerationNotMatch() + { + unset($this->if_metageneration_not_match); + } + + /** + * Makes the operation only succeed conditional on whether the folder's + * current metageneration does not match the given value. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 4; + * @param int|string $var + * @return $this + */ + public function setIfMetagenerationNotMatch($var) + { + GPBUtil::checkInt64($var); + $this->if_metageneration_not_match = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteManagedFolderRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteManagedFolderRequest.php new file mode 100644 index 000000000000..957f9300a277 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteManagedFolderRequest.php @@ -0,0 +1,271 @@ +google.storage.control.v2.DeleteManagedFolderRequest + */ +class DeleteManagedFolderRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * + * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The operation succeeds conditional on the managed folder's current + * metageneration matching the value here specified. + * + * Generated from protobuf field optional int64 if_metageneration_match = 3; + */ + protected $if_metageneration_match = null; + /** + * The operation succeeds conditional on the managed folder's current + * metageneration NOT matching the value here specified. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 4; + */ + protected $if_metageneration_not_match = null; + /** + * Allows deletion of a managed folder even if it is not empty. + * A managed folder is empty if it manages no child managed folders or + * objects. Caller must have permission for + * storage.managedFolders.setIamPolicy. + * + * Generated from protobuf field bool allow_non_empty = 5; + */ + protected $allow_non_empty = false; + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * Please see {@see StorageControlClient::managedFolderName()} for help formatting this field. + * + * @return \Google\Cloud\Storage\Control\V2\DeleteManagedFolderRequest + * + * @experimental + */ + public static function 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 managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * @type int|string $if_metageneration_match + * The operation succeeds conditional on the managed folder's current + * metageneration matching the value here specified. + * @type int|string $if_metageneration_not_match + * The operation succeeds conditional on the managed folder's current + * metageneration NOT matching the value here specified. + * @type bool $allow_non_empty + * Allows deletion of a managed folder even if it is not empty. + * A managed folder is empty if it manages no child managed folders or + * objects. Caller must have permission for + * storage.managedFolders.setIamPolicy. + * @type string $request_id + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * + * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * + * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The operation succeeds conditional on the managed folder's current + * metageneration matching the value here specified. + * + * Generated from protobuf field optional int64 if_metageneration_match = 3; + * @return int|string + */ + public function getIfMetagenerationMatch() + { + return isset($this->if_metageneration_match) ? $this->if_metageneration_match : 0; + } + + public function hasIfMetagenerationMatch() + { + return isset($this->if_metageneration_match); + } + + public function clearIfMetagenerationMatch() + { + unset($this->if_metageneration_match); + } + + /** + * The operation succeeds conditional on the managed folder's current + * metageneration matching the value here specified. + * + * Generated from protobuf field optional int64 if_metageneration_match = 3; + * @param int|string $var + * @return $this + */ + public function setIfMetagenerationMatch($var) + { + GPBUtil::checkInt64($var); + $this->if_metageneration_match = $var; + + return $this; + } + + /** + * The operation succeeds conditional on the managed folder's current + * metageneration NOT matching the value here specified. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 4; + * @return int|string + */ + public function getIfMetagenerationNotMatch() + { + return isset($this->if_metageneration_not_match) ? $this->if_metageneration_not_match : 0; + } + + public function hasIfMetagenerationNotMatch() + { + return isset($this->if_metageneration_not_match); + } + + public function clearIfMetagenerationNotMatch() + { + unset($this->if_metageneration_not_match); + } + + /** + * The operation succeeds conditional on the managed folder's current + * metageneration NOT matching the value here specified. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 4; + * @param int|string $var + * @return $this + */ + public function setIfMetagenerationNotMatch($var) + { + GPBUtil::checkInt64($var); + $this->if_metageneration_not_match = $var; + + return $this; + } + + /** + * Allows deletion of a managed folder even if it is not empty. + * A managed folder is empty if it manages no child managed folders or + * objects. Caller must have permission for + * storage.managedFolders.setIamPolicy. + * + * Generated from protobuf field bool allow_non_empty = 5; + * @return bool + */ + public function getAllowNonEmpty() + { + return $this->allow_non_empty; + } + + /** + * Allows deletion of a managed folder even if it is not empty. + * A managed folder is empty if it manages no child managed folders or + * objects. Caller must have permission for + * storage.managedFolders.setIamPolicy. + * + * Generated from protobuf field bool allow_non_empty = 5; + * @param bool $var + * @return $this + */ + public function setAllowNonEmpty($var) + { + GPBUtil::checkBool($var); + $this->allow_non_empty = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DisableAnywhereCacheRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DisableAnywhereCacheRequest.php new file mode 100644 index 000000000000..64e32b7ab883 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DisableAnywhereCacheRequest.php @@ -0,0 +1,128 @@ +google.storage.control.v2.DisableAnywhereCacheRequest + */ +class DisableAnywhereCacheRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name field in the request should be: + * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. This request is only + * idempotent if a `request_id` is provided. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. The name field in the request should be: + * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` + * Please see {@see StorageControlClient::anywhereCacheName()} for help formatting this field. + * + * @return \Google\Cloud\Storage\Control\V2\DisableAnywhereCacheRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name field in the request should be: + * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` + * @type string $request_id + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. This request is only + * idempotent if a `request_id` is provided. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name field in the request should be: + * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name field in the request should be: + * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. This request is only + * idempotent if a `request_id` is provided. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. This request is only + * idempotent if a `request_id` is provided. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/Folder.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/Folder.php new file mode 100644 index 000000000000..3bcb0c88fcfc --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/Folder.php @@ -0,0 +1,258 @@ +google.storage.control.v2.Folder + */ +class Folder extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The name of this folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The version of the metadata for this folder. Used for + * preconditions and for detecting changes in metadata. + * + * Generated from protobuf field int64 metageneration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $metageneration = 0; + /** + * Output only. The creation time of the folder. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The modification time of the folder. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. Only present if the folder is part of an ongoing RenameFolder + * operation. Contains information which can be used to query the operation + * status. The presence of this field also indicates all write operations are + * blocked for this folder, including folder, managed folder, and object + * operations. + * + * Generated from protobuf field .google.storage.control.v2.PendingRenameInfo pending_rename_info = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $pending_rename_info = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The name of this folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * @type int|string $metageneration + * Output only. The version of the metadata for this folder. Used for + * preconditions and for detecting changes in metadata. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation time of the folder. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The modification time of the folder. + * @type \Google\Cloud\Storage\Control\V2\PendingRenameInfo $pending_rename_info + * Output only. Only present if the folder is part of an ongoing RenameFolder + * operation. Contains information which can be used to query the operation + * status. The presence of this field also indicates all write operations are + * blocked for this folder, including folder, managed folder, and object + * operations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The name of this folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The name of this folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The version of the metadata for this folder. Used for + * preconditions and for detecting changes in metadata. + * + * Generated from protobuf field int64 metageneration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getMetageneration() + { + return $this->metageneration; + } + + /** + * Output only. The version of the metadata for this folder. Used for + * preconditions and for detecting changes in metadata. + * + * Generated from protobuf field int64 metageneration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setMetageneration($var) + { + GPBUtil::checkInt64($var); + $this->metageneration = $var; + + return $this; + } + + /** + * Output only. The creation time of the folder. + * + * 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 creation time of the folder. + * + * 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 modification time of the folder. + * + * 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 modification time of the folder. + * + * 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; + } + + /** + * Output only. Only present if the folder is part of an ongoing RenameFolder + * operation. Contains information which can be used to query the operation + * status. The presence of this field also indicates all write operations are + * blocked for this folder, including folder, managed folder, and object + * operations. + * + * Generated from protobuf field .google.storage.control.v2.PendingRenameInfo pending_rename_info = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Storage\Control\V2\PendingRenameInfo|null + */ + public function getPendingRenameInfo() + { + return $this->pending_rename_info; + } + + public function hasPendingRenameInfo() + { + return isset($this->pending_rename_info); + } + + public function clearPendingRenameInfo() + { + unset($this->pending_rename_info); + } + + /** + * Output only. Only present if the folder is part of an ongoing RenameFolder + * operation. Contains information which can be used to query the operation + * status. The presence of this field also indicates all write operations are + * blocked for this folder, including folder, managed folder, and object + * operations. + * + * Generated from protobuf field .google.storage.control.v2.PendingRenameInfo pending_rename_info = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Storage\Control\V2\PendingRenameInfo $var + * @return $this + */ + public function setPendingRenameInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\PendingRenameInfo::class); + $this->pending_rename_info = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetAnywhereCacheRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetAnywhereCacheRequest.php new file mode 100644 index 000000000000..599d72537012 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetAnywhereCacheRequest.php @@ -0,0 +1,124 @@ +google.storage.control.v2.GetAnywhereCacheRequest + */ +class GetAnywhereCacheRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name field in the request should be: + * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. The name field in the request should be: + * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` + * Please see {@see StorageControlClient::anywhereCacheName()} for help formatting this field. + * + * @return \Google\Cloud\Storage\Control\V2\GetAnywhereCacheRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name field in the request should be: + * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` + * @type string $request_id + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name field in the request should be: + * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name field in the request should be: + * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetFolderIntelligenceConfigRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetFolderIntelligenceConfigRequest.php new file mode 100644 index 000000000000..b3e8456ca818 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetFolderIntelligenceConfigRequest.php @@ -0,0 +1,97 @@ +google.storage.control.v2.GetFolderIntelligenceConfigRequest + */ +class GetFolderIntelligenceConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the `IntelligenceConfig` resource associated with + * your folder. + * Format: `folders/{id}/locations/global/intelligenceConfig` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the `IntelligenceConfig` resource associated with + * your folder. + * + * Format: `folders/{id}/locations/global/intelligenceConfig` + * Please see {@see StorageControlClient::intelligenceConfigName()} for help formatting this field. + * + * @return \Google\Cloud\Storage\Control\V2\GetFolderIntelligenceConfigRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the `IntelligenceConfig` resource associated with + * your folder. + * Format: `folders/{id}/locations/global/intelligenceConfig` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the `IntelligenceConfig` resource associated with + * your folder. + * Format: `folders/{id}/locations/global/intelligenceConfig` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the `IntelligenceConfig` resource associated with + * your folder. + * Format: `folders/{id}/locations/global/intelligenceConfig` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetFolderRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetFolderRequest.php new file mode 100644 index 000000000000..6ba954a244f2 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetFolderRequest.php @@ -0,0 +1,221 @@ +google.storage.control.v2.GetFolderRequest + */ +class GetFolderRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * + * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Makes the operation only succeed conditional on whether the folder's + * current metageneration matches the given value. + * + * Generated from protobuf field optional int64 if_metageneration_match = 3; + */ + protected $if_metageneration_match = null; + /** + * Makes the operation only succeed conditional on whether the folder's + * current metageneration does not match the given value. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 4; + */ + protected $if_metageneration_not_match = null; + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * Please see {@see StorageControlClient::folderName()} for help formatting this field. + * + * @return \Google\Cloud\Storage\Control\V2\GetFolderRequest + * + * @experimental + */ + public static function 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 folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * @type int|string $if_metageneration_match + * Makes the operation only succeed conditional on whether the folder's + * current metageneration matches the given value. + * @type int|string $if_metageneration_not_match + * Makes the operation only succeed conditional on whether the folder's + * current metageneration does not match the given value. + * @type string $request_id + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * + * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the folder. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * + * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Makes the operation only succeed conditional on whether the folder's + * current metageneration matches the given value. + * + * Generated from protobuf field optional int64 if_metageneration_match = 3; + * @return int|string + */ + public function getIfMetagenerationMatch() + { + return isset($this->if_metageneration_match) ? $this->if_metageneration_match : 0; + } + + public function hasIfMetagenerationMatch() + { + return isset($this->if_metageneration_match); + } + + public function clearIfMetagenerationMatch() + { + unset($this->if_metageneration_match); + } + + /** + * Makes the operation only succeed conditional on whether the folder's + * current metageneration matches the given value. + * + * Generated from protobuf field optional int64 if_metageneration_match = 3; + * @param int|string $var + * @return $this + */ + public function setIfMetagenerationMatch($var) + { + GPBUtil::checkInt64($var); + $this->if_metageneration_match = $var; + + return $this; + } + + /** + * Makes the operation only succeed conditional on whether the folder's + * current metageneration does not match the given value. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 4; + * @return int|string + */ + public function getIfMetagenerationNotMatch() + { + return isset($this->if_metageneration_not_match) ? $this->if_metageneration_not_match : 0; + } + + public function hasIfMetagenerationNotMatch() + { + return isset($this->if_metageneration_not_match); + } + + public function clearIfMetagenerationNotMatch() + { + unset($this->if_metageneration_not_match); + } + + /** + * Makes the operation only succeed conditional on whether the folder's + * current metageneration does not match the given value. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 4; + * @param int|string $var + * @return $this + */ + public function setIfMetagenerationNotMatch($var) + { + GPBUtil::checkInt64($var); + $this->if_metageneration_not_match = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetManagedFolderRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetManagedFolderRequest.php new file mode 100644 index 000000000000..b4deee313827 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetManagedFolderRequest.php @@ -0,0 +1,225 @@ +google.storage.control.v2.GetManagedFolderRequest + */ +class GetManagedFolderRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * + * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The operation succeeds conditional on the managed folder's current + * metageneration matching the value here specified. + * + * Generated from protobuf field optional int64 if_metageneration_match = 3; + */ + protected $if_metageneration_match = null; + /** + * The operation succeeds conditional on the managed folder's current + * metageneration NOT matching the value here specified. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 4; + */ + protected $if_metageneration_not_match = null; + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * Please see {@see StorageControlClient::managedFolderName()} for help formatting this field. + * + * @return \Google\Cloud\Storage\Control\V2\GetManagedFolderRequest + * + * @experimental + */ + public static function 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 managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * @type int|string $if_metageneration_match + * The operation succeeds conditional on the managed folder's current + * metageneration matching the value here specified. + * @type int|string $if_metageneration_not_match + * The operation succeeds conditional on the managed folder's current + * metageneration NOT matching the value here specified. + * @type string $request_id + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * + * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * + * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The operation succeeds conditional on the managed folder's current + * metageneration matching the value here specified. + * + * Generated from protobuf field optional int64 if_metageneration_match = 3; + * @return int|string + */ + public function getIfMetagenerationMatch() + { + return isset($this->if_metageneration_match) ? $this->if_metageneration_match : 0; + } + + public function hasIfMetagenerationMatch() + { + return isset($this->if_metageneration_match); + } + + public function clearIfMetagenerationMatch() + { + unset($this->if_metageneration_match); + } + + /** + * The operation succeeds conditional on the managed folder's current + * metageneration matching the value here specified. + * + * Generated from protobuf field optional int64 if_metageneration_match = 3; + * @param int|string $var + * @return $this + */ + public function setIfMetagenerationMatch($var) + { + GPBUtil::checkInt64($var); + $this->if_metageneration_match = $var; + + return $this; + } + + /** + * The operation succeeds conditional on the managed folder's current + * metageneration NOT matching the value here specified. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 4; + * @return int|string + */ + public function getIfMetagenerationNotMatch() + { + return isset($this->if_metageneration_not_match) ? $this->if_metageneration_not_match : 0; + } + + public function hasIfMetagenerationNotMatch() + { + return isset($this->if_metageneration_not_match); + } + + public function clearIfMetagenerationNotMatch() + { + unset($this->if_metageneration_not_match); + } + + /** + * The operation succeeds conditional on the managed folder's current + * metageneration NOT matching the value here specified. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 4; + * @param int|string $var + * @return $this + */ + public function setIfMetagenerationNotMatch($var) + { + GPBUtil::checkInt64($var); + $this->if_metageneration_not_match = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetOrganizationIntelligenceConfigRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetOrganizationIntelligenceConfigRequest.php new file mode 100644 index 000000000000..6b28f9803e05 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetOrganizationIntelligenceConfigRequest.php @@ -0,0 +1,97 @@ +google.storage.control.v2.GetOrganizationIntelligenceConfigRequest + */ +class GetOrganizationIntelligenceConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the `IntelligenceConfig` resource associated with + * your organization. + * Format: `organizations/{org_id}/locations/global/intelligenceConfig` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the `IntelligenceConfig` resource associated with + * your organization. + * + * Format: `organizations/{org_id}/locations/global/intelligenceConfig` + * Please see {@see StorageControlClient::intelligenceConfigName()} for help formatting this field. + * + * @return \Google\Cloud\Storage\Control\V2\GetOrganizationIntelligenceConfigRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the `IntelligenceConfig` resource associated with + * your organization. + * Format: `organizations/{org_id}/locations/global/intelligenceConfig` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the `IntelligenceConfig` resource associated with + * your organization. + * Format: `organizations/{org_id}/locations/global/intelligenceConfig` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the `IntelligenceConfig` resource associated with + * your organization. + * Format: `organizations/{org_id}/locations/global/intelligenceConfig` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetProjectIntelligenceConfigRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetProjectIntelligenceConfigRequest.php new file mode 100644 index 000000000000..bad00321de29 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetProjectIntelligenceConfigRequest.php @@ -0,0 +1,97 @@ +google.storage.control.v2.GetProjectIntelligenceConfigRequest + */ +class GetProjectIntelligenceConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the `IntelligenceConfig` resource associated with + * your project. + * Format: `projects/{id}/locations/global/intelligenceConfig` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the `IntelligenceConfig` resource associated with + * your project. + * + * Format: `projects/{id}/locations/global/intelligenceConfig` + * Please see {@see StorageControlClient::intelligenceConfigName()} for help formatting this field. + * + * @return \Google\Cloud\Storage\Control\V2\GetProjectIntelligenceConfigRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the `IntelligenceConfig` resource associated with + * your project. + * Format: `projects/{id}/locations/global/intelligenceConfig` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the `IntelligenceConfig` resource associated with + * your project. + * Format: `projects/{id}/locations/global/intelligenceConfig` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the `IntelligenceConfig` resource associated with + * your project. + * Format: `projects/{id}/locations/global/intelligenceConfig` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetStorageLayoutRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetStorageLayoutRequest.php new file mode 100644 index 000000000000..ca2429d9ac1f --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetStorageLayoutRequest.php @@ -0,0 +1,162 @@ +google.storage.control.v2.GetStorageLayoutRequest + */ +class GetStorageLayoutRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the StorageLayout resource. + * Format: `projects/{project}/buckets/{bucket}/storageLayout` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * An optional prefix used for permission check. It is useful when the caller + * only has limited permissions under a specific prefix. + * + * Generated from protobuf field string prefix = 2; + */ + protected $prefix = ''; + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. The name of the StorageLayout resource. + * Format: `projects/{project}/buckets/{bucket}/storageLayout` + * Please see {@see StorageControlClient::storageLayoutName()} for help formatting this field. + * + * @return \Google\Cloud\Storage\Control\V2\GetStorageLayoutRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the StorageLayout resource. + * Format: `projects/{project}/buckets/{bucket}/storageLayout` + * @type string $prefix + * An optional prefix used for permission check. It is useful when the caller + * only has limited permissions under a specific prefix. + * @type string $request_id + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the StorageLayout resource. + * Format: `projects/{project}/buckets/{bucket}/storageLayout` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the StorageLayout resource. + * Format: `projects/{project}/buckets/{bucket}/storageLayout` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * An optional prefix used for permission check. It is useful when the caller + * only has limited permissions under a specific prefix. + * + * Generated from protobuf field string prefix = 2; + * @return string + */ + public function getPrefix() + { + return $this->prefix; + } + + /** + * An optional prefix used for permission check. It is useful when the caller + * only has limited permissions under a specific prefix. + * + * Generated from protobuf field string prefix = 2; + * @param string $var + * @return $this + */ + public function setPrefix($var) + { + GPBUtil::checkString($var, True); + $this->prefix = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig.php new file mode 100644 index 000000000000..2ccf8f12cc0b --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig.php @@ -0,0 +1,314 @@ +google.storage.control.v2.IntelligenceConfig + */ +class IntelligenceConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The name of the `IntelligenceConfig` resource associated with + * your organization, folder, or project. + * The name format varies based on the GCP resource hierarchy as follows: + * * For project: + * `projects/{project_number}/locations/global/intelligenceConfig` + * * For organization: + * `organizations/{org_id}/locations/global/intelligenceConfig` + * * For folder: `folders/{folder_id}/locations/global/intelligenceConfig` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Optional. The edition configuration of the `IntelligenceConfig` resource. + * + * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.EditionConfig edition_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $edition_config = 0; + /** + * Output only. The time at which the `IntelligenceConfig` resource is last + * updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Filter over location and bucket. + * + * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.Filter filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = null; + /** + * Output only. The `IntelligenceConfig` resource that is applicable for the + * resource. + * + * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig effective_intelligence_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $effective_intelligence_config = null; + /** + * The trial configuration of the `IntelligenceConfig` resource. + * + * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.TrialConfig trial_config = 7; + */ + protected $trial_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The name of the `IntelligenceConfig` resource associated with + * your organization, folder, or project. + * The name format varies based on the GCP resource hierarchy as follows: + * * For project: + * `projects/{project_number}/locations/global/intelligenceConfig` + * * For organization: + * `organizations/{org_id}/locations/global/intelligenceConfig` + * * For folder: `folders/{folder_id}/locations/global/intelligenceConfig` + * @type int $edition_config + * Optional. The edition configuration of the `IntelligenceConfig` resource. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time at which the `IntelligenceConfig` resource is last + * updated. + * @type \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter $filter + * Optional. Filter over location and bucket. + * @type \Google\Cloud\Storage\Control\V2\IntelligenceConfig\EffectiveIntelligenceConfig $effective_intelligence_config + * Output only. The `IntelligenceConfig` resource that is applicable for the + * resource. + * @type \Google\Cloud\Storage\Control\V2\IntelligenceConfig\TrialConfig $trial_config + * The trial configuration of the `IntelligenceConfig` resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The name of the `IntelligenceConfig` resource associated with + * your organization, folder, or project. + * The name format varies based on the GCP resource hierarchy as follows: + * * For project: + * `projects/{project_number}/locations/global/intelligenceConfig` + * * For organization: + * `organizations/{org_id}/locations/global/intelligenceConfig` + * * For folder: `folders/{folder_id}/locations/global/intelligenceConfig` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The name of the `IntelligenceConfig` resource associated with + * your organization, folder, or project. + * The name format varies based on the GCP resource hierarchy as follows: + * * For project: + * `projects/{project_number}/locations/global/intelligenceConfig` + * * For organization: + * `organizations/{org_id}/locations/global/intelligenceConfig` + * * For folder: `folders/{folder_id}/locations/global/intelligenceConfig` + * + * 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 edition configuration of the `IntelligenceConfig` resource. + * + * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.EditionConfig edition_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getEditionConfig() + { + return $this->edition_config; + } + + /** + * Optional. The edition configuration of the `IntelligenceConfig` resource. + * + * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.EditionConfig edition_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setEditionConfig($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Storage\Control\V2\IntelligenceConfig\EditionConfig::class); + $this->edition_config = $var; + + return $this; + } + + /** + * Output only. The time at which the `IntelligenceConfig` resource is last + * updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The time at which the `IntelligenceConfig` resource is last + * updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Optional. Filter over location and bucket. + * + * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.Filter filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter|null + */ + public function getFilter() + { + return $this->filter; + } + + public function hasFilter() + { + return isset($this->filter); + } + + public function clearFilter() + { + unset($this->filter); + } + + /** + * Optional. Filter over location and bucket. + * + * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.Filter filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter::class); + $this->filter = $var; + + return $this; + } + + /** + * Output only. The `IntelligenceConfig` resource that is applicable for the + * resource. + * + * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig effective_intelligence_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Storage\Control\V2\IntelligenceConfig\EffectiveIntelligenceConfig|null + */ + public function getEffectiveIntelligenceConfig() + { + return $this->effective_intelligence_config; + } + + public function hasEffectiveIntelligenceConfig() + { + return isset($this->effective_intelligence_config); + } + + public function clearEffectiveIntelligenceConfig() + { + unset($this->effective_intelligence_config); + } + + /** + * Output only. The `IntelligenceConfig` resource that is applicable for the + * resource. + * + * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig effective_intelligence_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Storage\Control\V2\IntelligenceConfig\EffectiveIntelligenceConfig $var + * @return $this + */ + public function setEffectiveIntelligenceConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\IntelligenceConfig\EffectiveIntelligenceConfig::class); + $this->effective_intelligence_config = $var; + + return $this; + } + + /** + * The trial configuration of the `IntelligenceConfig` resource. + * + * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.TrialConfig trial_config = 7; + * @return \Google\Cloud\Storage\Control\V2\IntelligenceConfig\TrialConfig|null + */ + public function getTrialConfig() + { + return $this->trial_config; + } + + public function hasTrialConfig() + { + return isset($this->trial_config); + } + + public function clearTrialConfig() + { + unset($this->trial_config); + } + + /** + * The trial configuration of the `IntelligenceConfig` resource. + * + * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.TrialConfig trial_config = 7; + * @param \Google\Cloud\Storage\Control\V2\IntelligenceConfig\TrialConfig $var + * @return $this + */ + public function setTrialConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\IntelligenceConfig\TrialConfig::class); + $this->trial_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/EditionConfig.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/EditionConfig.php new file mode 100644 index 000000000000..447e5b18fa95 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/EditionConfig.php @@ -0,0 +1,88 @@ +google.storage.control.v2.IntelligenceConfig.EditionConfig + */ +class EditionConfig +{ + /** + * This is an unknown edition of the resource. + * + * Generated from protobuf enum EDITION_CONFIG_UNSPECIFIED = 0; + */ + const EDITION_CONFIG_UNSPECIFIED = 0; + /** + * The inherited edition from the parent and filters. This is the default + * edition when there is no `IntelligenceConfig` setup for a GCP resource. + * + * Generated from protobuf enum INHERIT = 1; + */ + const INHERIT = 1; + /** + * The edition configuration is disabled for the `IntelligenceConfig` + * resource and its children. Filters are not applicable. + * + * Generated from protobuf enum DISABLED = 2; + */ + const DISABLED = 2; + /** + * The `IntelligenceConfig` resource is of STANDARD edition. + * + * Generated from protobuf enum STANDARD = 3; + */ + const STANDARD = 3; + /** + * The `IntelligenceConfig` resource is available in `TRIAL` edition. During + * the trial period, Cloud Storage does not charge for Storage Intelligence + * usage. You can specify the buckets to include in the trial period by + * using filters. At the end of the trial period, the `IntelligenceConfig` + * resource is upgraded to `STANDARD` edition. + * + * Generated from protobuf enum TRIAL = 5; + */ + const TRIAL = 5; + + private static $valueToName = [ + self::EDITION_CONFIG_UNSPECIFIED => 'EDITION_CONFIG_UNSPECIFIED', + self::INHERIT => 'INHERIT', + self::DISABLED => 'DISABLED', + self::STANDARD => 'STANDARD', + self::TRIAL => 'TRIAL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EditionConfig::class, \Google\Cloud\Storage\Control\V2\IntelligenceConfig_EditionConfig::class); + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/EffectiveIntelligenceConfig.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/EffectiveIntelligenceConfig.php new file mode 100644 index 000000000000..819cea0bf40b --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/EffectiveIntelligenceConfig.php @@ -0,0 +1,116 @@ +google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + */ +class EffectiveIntelligenceConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The `IntelligenceConfig` edition that is applicable for the + * resource. + * + * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig.EffectiveEdition effective_edition = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $effective_edition = 0; + /** + * Output only. The `IntelligenceConfig` resource that is applied for the + * target resource. Format: + * `{organizations|folders|projects}/{id}/locations/{location}/intelligenceConfig` + * + * Generated from protobuf field string intelligence_config = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $intelligence_config = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $effective_edition + * Output only. The `IntelligenceConfig` edition that is applicable for the + * resource. + * @type string $intelligence_config + * Output only. The `IntelligenceConfig` resource that is applied for the + * target resource. Format: + * `{organizations|folders|projects}/{id}/locations/{location}/intelligenceConfig` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The `IntelligenceConfig` edition that is applicable for the + * resource. + * + * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig.EffectiveEdition effective_edition = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getEffectiveEdition() + { + return $this->effective_edition; + } + + /** + * Output only. The `IntelligenceConfig` edition that is applicable for the + * resource. + * + * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig.EffectiveEdition effective_edition = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setEffectiveEdition($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Storage\Control\V2\IntelligenceConfig\EffectiveIntelligenceConfig\EffectiveEdition::class); + $this->effective_edition = $var; + + return $this; + } + + /** + * Output only. The `IntelligenceConfig` resource that is applied for the + * target resource. Format: + * `{organizations|folders|projects}/{id}/locations/{location}/intelligenceConfig` + * + * Generated from protobuf field string intelligence_config = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getIntelligenceConfig() + { + return $this->intelligence_config; + } + + /** + * Output only. The `IntelligenceConfig` resource that is applied for the + * target resource. Format: + * `{organizations|folders|projects}/{id}/locations/{location}/intelligenceConfig` + * + * Generated from protobuf field string intelligence_config = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setIntelligenceConfig($var) + { + GPBUtil::checkString($var, True); + $this->intelligence_config = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EffectiveIntelligenceConfig::class, \Google\Cloud\Storage\Control\V2\IntelligenceConfig_EffectiveIntelligenceConfig::class); + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/EffectiveIntelligenceConfig/EffectiveEdition.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/EffectiveIntelligenceConfig/EffectiveEdition.php new file mode 100644 index 000000000000..914d2214f4e3 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/EffectiveIntelligenceConfig/EffectiveEdition.php @@ -0,0 +1,64 @@ +google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig.EffectiveEdition + */ +class EffectiveEdition +{ + /** + * This is an unknown edition of the resource. + * + * Generated from protobuf enum EFFECTIVE_EDITION_UNSPECIFIED = 0; + */ + const EFFECTIVE_EDITION_UNSPECIFIED = 0; + /** + * No edition. + * + * Generated from protobuf enum NONE = 1; + */ + const NONE = 1; + /** + * The `IntelligenceConfig` resource is of STANDARD edition. + * + * Generated from protobuf enum STANDARD = 2; + */ + const STANDARD = 2; + + private static $valueToName = [ + self::EFFECTIVE_EDITION_UNSPECIFIED => 'EFFECTIVE_EDITION_UNSPECIFIED', + self::NONE => 'NONE', + self::STANDARD => 'STANDARD', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EffectiveEdition::class, \Google\Cloud\Storage\Control\V2\IntelligenceConfig_EffectiveIntelligenceConfig_EffectiveEdition::class); + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/Filter.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/Filter.php new file mode 100644 index 000000000000..e55bcb81f2af --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/Filter.php @@ -0,0 +1,188 @@ +google.storage.control.v2.IntelligenceConfig.Filter + */ +class Filter extends \Google\Protobuf\Internal\Message +{ + protected $cloud_storage_locations; + protected $cloud_storage_buckets; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter\CloudStorageLocations $included_cloud_storage_locations + * Bucket locations to include. + * @type \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter\CloudStorageLocations $excluded_cloud_storage_locations + * Bucket locations to exclude. + * @type \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter\CloudStorageBuckets $included_cloud_storage_buckets + * Buckets to include. + * @type \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter\CloudStorageBuckets $excluded_cloud_storage_buckets + * Buckets to exclude. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Bucket locations to include. + * + * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations included_cloud_storage_locations = 1; + * @return \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter\CloudStorageLocations|null + */ + public function getIncludedCloudStorageLocations() + { + return $this->readOneof(1); + } + + public function hasIncludedCloudStorageLocations() + { + return $this->hasOneof(1); + } + + /** + * Bucket locations to include. + * + * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations included_cloud_storage_locations = 1; + * @param \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter\CloudStorageLocations $var + * @return $this + */ + public function setIncludedCloudStorageLocations($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter\CloudStorageLocations::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Bucket locations to exclude. + * + * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations excluded_cloud_storage_locations = 2; + * @return \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter\CloudStorageLocations|null + */ + public function getExcludedCloudStorageLocations() + { + return $this->readOneof(2); + } + + public function hasExcludedCloudStorageLocations() + { + return $this->hasOneof(2); + } + + /** + * Bucket locations to exclude. + * + * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations excluded_cloud_storage_locations = 2; + * @param \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter\CloudStorageLocations $var + * @return $this + */ + public function setExcludedCloudStorageLocations($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter\CloudStorageLocations::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Buckets to include. + * + * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets included_cloud_storage_buckets = 3; + * @return \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter\CloudStorageBuckets|null + */ + public function getIncludedCloudStorageBuckets() + { + return $this->readOneof(3); + } + + public function hasIncludedCloudStorageBuckets() + { + return $this->hasOneof(3); + } + + /** + * Buckets to include. + * + * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets included_cloud_storage_buckets = 3; + * @param \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter\CloudStorageBuckets $var + * @return $this + */ + public function setIncludedCloudStorageBuckets($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter\CloudStorageBuckets::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Buckets to exclude. + * + * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets excluded_cloud_storage_buckets = 4; + * @return \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter\CloudStorageBuckets|null + */ + public function getExcludedCloudStorageBuckets() + { + return $this->readOneof(4); + } + + public function hasExcludedCloudStorageBuckets() + { + return $this->hasOneof(4); + } + + /** + * Buckets to exclude. + * + * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets excluded_cloud_storage_buckets = 4; + * @param \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter\CloudStorageBuckets $var + * @return $this + */ + public function setExcludedCloudStorageBuckets($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter\CloudStorageBuckets::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getCloudStorageLocations() + { + return $this->whichOneof("cloud_storage_locations"); + } + + /** + * @return string + */ + public function getCloudStorageBuckets() + { + return $this->whichOneof("cloud_storage_buckets"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Filter::class, \Google\Cloud\Storage\Control\V2\IntelligenceConfig_Filter::class); + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/Filter/CloudStorageBuckets.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/Filter/CloudStorageBuckets.php new file mode 100644 index 000000000000..2c13e22af394 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/Filter/CloudStorageBuckets.php @@ -0,0 +1,98 @@ +google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + */ +class CloudStorageBuckets extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. A regex pattern for matching bucket names. Regex should + * follow the syntax specified in + * [google/re2](https://github.com/google/re2). For example, + * `^sample_.*` matches all buckets of the form + * `gs://sample_bucket-1`, `gs://sample_bucket-2`, + * `gs://sample_bucket-n` but not `gs://test_sample_bucket`. + * If you want to match a single bucket, say `gs://sample_bucket`, + * use `sample_bucket`. + * + * Generated from protobuf field repeated string bucket_id_regexes = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $bucket_id_regexes; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $bucket_id_regexes + * Optional. A regex pattern for matching bucket names. Regex should + * follow the syntax specified in + * [google/re2](https://github.com/google/re2). For example, + * `^sample_.*` matches all buckets of the form + * `gs://sample_bucket-1`, `gs://sample_bucket-2`, + * `gs://sample_bucket-n` but not `gs://test_sample_bucket`. + * If you want to match a single bucket, say `gs://sample_bucket`, + * use `sample_bucket`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Optional. A regex pattern for matching bucket names. Regex should + * follow the syntax specified in + * [google/re2](https://github.com/google/re2). For example, + * `^sample_.*` matches all buckets of the form + * `gs://sample_bucket-1`, `gs://sample_bucket-2`, + * `gs://sample_bucket-n` but not `gs://test_sample_bucket`. + * If you want to match a single bucket, say `gs://sample_bucket`, + * use `sample_bucket`. + * + * Generated from protobuf field repeated string bucket_id_regexes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBucketIdRegexes() + { + return $this->bucket_id_regexes; + } + + /** + * Optional. A regex pattern for matching bucket names. Regex should + * follow the syntax specified in + * [google/re2](https://github.com/google/re2). For example, + * `^sample_.*` matches all buckets of the form + * `gs://sample_bucket-1`, `gs://sample_bucket-2`, + * `gs://sample_bucket-n` but not `gs://test_sample_bucket`. + * If you want to match a single bucket, say `gs://sample_bucket`, + * use `sample_bucket`. + * + * Generated from protobuf field repeated string bucket_id_regexes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBucketIdRegexes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->bucket_id_regexes = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CloudStorageBuckets::class, \Google\Cloud\Storage\Control\V2\IntelligenceConfig_Filter_CloudStorageBuckets::class); + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/Filter/CloudStorageLocations.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/Filter/CloudStorageLocations.php new file mode 100644 index 000000000000..0f1ac219c845 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/Filter/CloudStorageLocations.php @@ -0,0 +1,78 @@ +google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + */ +class CloudStorageLocations extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Bucket locations. Location can be any of the Cloud Storage + * regions specified in lower case format. For example, `us-east1`, + * `us-west1`. + * + * Generated from protobuf field repeated string locations = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $locations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $locations + * Optional. Bucket locations. Location can be any of the Cloud Storage + * regions specified in lower case format. For example, `us-east1`, + * `us-west1`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Bucket locations. Location can be any of the Cloud Storage + * regions specified in lower case format. For example, `us-east1`, + * `us-west1`. + * + * Generated from protobuf field repeated string locations = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLocations() + { + return $this->locations; + } + + /** + * Optional. Bucket locations. Location can be any of the Cloud Storage + * regions specified in lower case format. For example, `us-east1`, + * `us-west1`. + * + * Generated from protobuf field repeated string locations = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLocations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->locations = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CloudStorageLocations::class, \Google\Cloud\Storage\Control\V2\IntelligenceConfig_Filter_CloudStorageLocations::class); + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/TrialConfig.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/TrialConfig.php new file mode 100644 index 000000000000..25e7bdf56716 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/TrialConfig.php @@ -0,0 +1,80 @@ +google.storage.control.v2.IntelligenceConfig.TrialConfig + */ +class TrialConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time at which the trial expires. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $expire_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $expire_time + * Output only. The time at which the trial expires. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The time at which the trial expires. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpireTime() + { + return $this->expire_time; + } + + public function hasExpireTime() + { + return isset($this->expire_time); + } + + public function clearExpireTime() + { + unset($this->expire_time); + } + + /** + * Output only. The time at which the trial expires. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expire_time = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TrialConfig::class, \Google\Cloud\Storage\Control\V2\IntelligenceConfig_TrialConfig::class); + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListAnywhereCachesRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListAnywhereCachesRequest.php new file mode 100644 index 000000000000..f845cffc7d9a --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListAnywhereCachesRequest.php @@ -0,0 +1,195 @@ +google.storage.control.v2.ListAnywhereCachesRequest + */ +class ListAnywhereCachesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The bucket to which this cache belongs. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of caches to return in a single response. + * The service will use this parameter or 1,000 items, whichever is smaller. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A previously-returned page token representing part of the larger set of + * results to view. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The bucket to which this cache belongs. Please see + * {@see StorageControlClient::bucketName()} for help formatting this field. + * + * @return \Google\Cloud\Storage\Control\V2\ListAnywhereCachesRequest + * + * @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 bucket to which this cache belongs. + * @type int $page_size + * Maximum number of caches to return in a single response. + * The service will use this parameter or 1,000 items, whichever is smaller. + * @type string $page_token + * A previously-returned page token representing part of the larger set of + * results to view. + * @type string $request_id + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. The bucket to which this cache belongs. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The bucket to which this cache belongs. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Maximum number of caches to return in a single response. + * The service will use this parameter or 1,000 items, whichever is smaller. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of caches to return in a single response. + * The service will use this parameter or 1,000 items, whichever is smaller. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A previously-returned page token representing part of the larger set of + * results to view. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A previously-returned page token representing part of the larger set of + * results to view. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * 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. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListAnywhereCachesResponse.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListAnywhereCachesResponse.php new file mode 100644 index 000000000000..79115e5d5a33 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListAnywhereCachesResponse.php @@ -0,0 +1,105 @@ +google.storage.control.v2.ListAnywhereCachesResponse + */ +class ListAnywhereCachesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of items. + * + * Generated from protobuf field repeated .google.storage.control.v2.AnywhereCache anywhere_caches = 1; + */ + private $anywhere_caches; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Storage\Control\V2\AnywhereCache>|\Google\Protobuf\Internal\RepeatedField $anywhere_caches + * The list of items. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * The list of items. + * + * Generated from protobuf field repeated .google.storage.control.v2.AnywhereCache anywhere_caches = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAnywhereCaches() + { + return $this->anywhere_caches; + } + + /** + * The list of items. + * + * Generated from protobuf field repeated .google.storage.control.v2.AnywhereCache anywhere_caches = 1; + * @param array<\Google\Cloud\Storage\Control\V2\AnywhereCache>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAnywhereCaches($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Storage\Control\V2\AnywhereCache::class); + $this->anywhere_caches = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListFoldersRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListFoldersRequest.php new file mode 100644 index 000000000000..9f009d6463c2 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListFoldersRequest.php @@ -0,0 +1,373 @@ +google.storage.control.v2.ListFoldersRequest + */ +class ListFoldersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the bucket in which to look for folders. The bucket must + * be a hierarchical namespace enabled bucket. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Maximum number of folders to return in a single response. The + * service will use this parameter or 1,000 items, whichever is smaller. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A previously-returned page token representing part of the larger + * set of results to view. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Filter results to folders whose names begin with this prefix. + * If set, the value must either be an empty string or end with a '/'. + * + * Generated from protobuf field string prefix = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $prefix = ''; + /** + * Optional. If set, returns results in a directory-like mode. The results + * will only include folders that either exactly match the above prefix, or + * are one level below the prefix. The only supported value is '/'. + * + * Generated from protobuf field string delimiter = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $delimiter = ''; + /** + * Optional. Filter results to folders whose names are lexicographically equal + * to or after lexicographic_start. If lexicographic_end is also set, the + * folders listed have names between lexicographic_start (inclusive) and + * lexicographic_end (exclusive). + * + * Generated from protobuf field string lexicographic_start = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $lexicographic_start = ''; + /** + * Optional. Filter results to folders whose names are lexicographically + * before lexicographic_end. If lexicographic_start is also set, the folders + * listed have names between lexicographic_start (inclusive) and + * lexicographic_end (exclusive). + * + * Generated from protobuf field string lexicographic_end = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $lexicographic_end = ''; + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $parent Required. Name of the bucket in which to look for folders. The bucket must + * be a hierarchical namespace enabled bucket. Please see + * {@see StorageControlClient::bucketName()} for help formatting this field. + * + * @return \Google\Cloud\Storage\Control\V2\ListFoldersRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Name of the bucket in which to look for folders. The bucket must + * be a hierarchical namespace enabled bucket. + * @type int $page_size + * Optional. Maximum number of folders to return in a single response. The + * service will use this parameter or 1,000 items, whichever is smaller. + * @type string $page_token + * Optional. A previously-returned page token representing part of the larger + * set of results to view. + * @type string $prefix + * Optional. Filter results to folders whose names begin with this prefix. + * If set, the value must either be an empty string or end with a '/'. + * @type string $delimiter + * Optional. If set, returns results in a directory-like mode. The results + * will only include folders that either exactly match the above prefix, or + * are one level below the prefix. The only supported value is '/'. + * @type string $lexicographic_start + * Optional. Filter results to folders whose names are lexicographically equal + * to or after lexicographic_start. If lexicographic_end is also set, the + * folders listed have names between lexicographic_start (inclusive) and + * lexicographic_end (exclusive). + * @type string $lexicographic_end + * Optional. Filter results to folders whose names are lexicographically + * before lexicographic_end. If lexicographic_start is also set, the folders + * listed have names between lexicographic_start (inclusive) and + * lexicographic_end (exclusive). + * @type string $request_id + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the bucket in which to look for folders. The bucket must + * be a hierarchical namespace enabled bucket. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Name of the bucket in which to look for folders. The bucket must + * be a hierarchical namespace enabled bucket. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Maximum number of folders to return in a single response. The + * service will use this parameter or 1,000 items, whichever is smaller. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Maximum number of folders to return in a single response. The + * service will use this parameter or 1,000 items, whichever is smaller. + * + * 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 previously-returned page token representing part of the larger + * set of results to view. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A previously-returned page token representing part of the larger + * set of results to view. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Filter results to folders whose names begin with this prefix. + * If set, the value must either be an empty string or end with a '/'. + * + * Generated from protobuf field string prefix = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPrefix() + { + return $this->prefix; + } + + /** + * Optional. Filter results to folders whose names begin with this prefix. + * If set, the value must either be an empty string or end with a '/'. + * + * Generated from protobuf field string prefix = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPrefix($var) + { + GPBUtil::checkString($var, True); + $this->prefix = $var; + + return $this; + } + + /** + * Optional. If set, returns results in a directory-like mode. The results + * will only include folders that either exactly match the above prefix, or + * are one level below the prefix. The only supported value is '/'. + * + * Generated from protobuf field string delimiter = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDelimiter() + { + return $this->delimiter; + } + + /** + * Optional. If set, returns results in a directory-like mode. The results + * will only include folders that either exactly match the above prefix, or + * are one level below the prefix. The only supported value is '/'. + * + * Generated from protobuf field string delimiter = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDelimiter($var) + { + GPBUtil::checkString($var, True); + $this->delimiter = $var; + + return $this; + } + + /** + * Optional. Filter results to folders whose names are lexicographically equal + * to or after lexicographic_start. If lexicographic_end is also set, the + * folders listed have names between lexicographic_start (inclusive) and + * lexicographic_end (exclusive). + * + * Generated from protobuf field string lexicographic_start = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getLexicographicStart() + { + return $this->lexicographic_start; + } + + /** + * Optional. Filter results to folders whose names are lexicographically equal + * to or after lexicographic_start. If lexicographic_end is also set, the + * folders listed have names between lexicographic_start (inclusive) and + * lexicographic_end (exclusive). + * + * Generated from protobuf field string lexicographic_start = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setLexicographicStart($var) + { + GPBUtil::checkString($var, True); + $this->lexicographic_start = $var; + + return $this; + } + + /** + * Optional. Filter results to folders whose names are lexicographically + * before lexicographic_end. If lexicographic_start is also set, the folders + * listed have names between lexicographic_start (inclusive) and + * lexicographic_end (exclusive). + * + * Generated from protobuf field string lexicographic_end = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getLexicographicEnd() + { + return $this->lexicographic_end; + } + + /** + * Optional. Filter results to folders whose names are lexicographically + * before lexicographic_end. If lexicographic_start is also set, the folders + * listed have names between lexicographic_start (inclusive) and + * lexicographic_end (exclusive). + * + * Generated from protobuf field string lexicographic_end = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setLexicographicEnd($var) + { + GPBUtil::checkString($var, True); + $this->lexicographic_end = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListFoldersResponse.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListFoldersResponse.php new file mode 100644 index 000000000000..eb67af3ca9e8 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListFoldersResponse.php @@ -0,0 +1,105 @@ +google.storage.control.v2.ListFoldersResponse + */ +class ListFoldersResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of child folders + * + * Generated from protobuf field repeated .google.storage.control.v2.Folder folders = 1; + */ + private $folders; + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Storage\Control\V2\Folder>|\Google\Protobuf\Internal\RepeatedField $folders + * The list of child folders + * @type string $next_page_token + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * The list of child folders + * + * Generated from protobuf field repeated .google.storage.control.v2.Folder folders = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFolders() + { + return $this->folders; + } + + /** + * The list of child folders + * + * Generated from protobuf field repeated .google.storage.control.v2.Folder folders = 1; + * @param array<\Google\Cloud\Storage\Control\V2\Folder>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFolders($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Storage\Control\V2\Folder::class); + $this->folders = $arr; + + return $this; + } + + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListManagedFoldersRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListManagedFoldersRequest.php new file mode 100644 index 000000000000..4af92f638e5a --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListManagedFoldersRequest.php @@ -0,0 +1,233 @@ +google.storage.control.v2.ListManagedFoldersRequest + */ +class ListManagedFoldersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the bucket this managed folder belongs to. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Maximum number of managed folders to return in a single response. + * The service will use this parameter or 1,000 items, whichever is smaller. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A previously-returned page token representing part of the larger + * set of results to view. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Filter results to match managed folders with name starting with + * this prefix. + * + * Generated from protobuf field string prefix = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $prefix = ''; + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $parent Required. Name of the bucket this managed folder belongs to. Please see + * {@see StorageControlClient::bucketName()} for help formatting this field. + * + * @return \Google\Cloud\Storage\Control\V2\ListManagedFoldersRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Name of the bucket this managed folder belongs to. + * @type int $page_size + * Optional. Maximum number of managed folders to return in a single response. + * The service will use this parameter or 1,000 items, whichever is smaller. + * @type string $page_token + * Optional. A previously-returned page token representing part of the larger + * set of results to view. + * @type string $prefix + * Optional. Filter results to match managed folders with name starting with + * this prefix. + * @type string $request_id + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the bucket this managed folder belongs to. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Name of the bucket this managed folder belongs to. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Maximum number of managed folders to return in a single response. + * The service will use this parameter or 1,000 items, whichever is smaller. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Maximum number of managed folders to return in a single response. + * The service will use this parameter or 1,000 items, whichever is smaller. + * + * 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 previously-returned page token representing part of the larger + * set of results to view. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A previously-returned page token representing part of the larger + * set of results to view. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Filter results to match managed folders with name starting with + * this prefix. + * + * Generated from protobuf field string prefix = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPrefix() + { + return $this->prefix; + } + + /** + * Optional. Filter results to match managed folders with name starting with + * this prefix. + * + * Generated from protobuf field string prefix = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPrefix($var) + { + GPBUtil::checkString($var, True); + $this->prefix = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. + * + * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListManagedFoldersResponse.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListManagedFoldersResponse.php new file mode 100644 index 000000000000..7ca7daea2e9c --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListManagedFoldersResponse.php @@ -0,0 +1,105 @@ +google.storage.control.v2.ListManagedFoldersResponse + */ +class ListManagedFoldersResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of matching managed folders + * + * Generated from protobuf field repeated .google.storage.control.v2.ManagedFolder managed_folders = 1; + */ + private $managed_folders; + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Storage\Control\V2\ManagedFolder>|\Google\Protobuf\Internal\RepeatedField $managed_folders + * The list of matching managed folders + * @type string $next_page_token + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * The list of matching managed folders + * + * Generated from protobuf field repeated .google.storage.control.v2.ManagedFolder managed_folders = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getManagedFolders() + { + return $this->managed_folders; + } + + /** + * The list of matching managed folders + * + * Generated from protobuf field repeated .google.storage.control.v2.ManagedFolder managed_folders = 1; + * @param array<\Google\Cloud\Storage\Control\V2\ManagedFolder>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setManagedFolders($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Storage\Control\V2\ManagedFolder::class); + $this->managed_folders = $arr; + + return $this; + } + + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The continuation token, used to page through large result sets. Provide + * this value in a subsequent request to return the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ManagedFolder.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ManagedFolder.php new file mode 100644 index 000000000000..46a6d1984b82 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ManagedFolder.php @@ -0,0 +1,205 @@ +google.storage.control.v2.ManagedFolder + */ +class ManagedFolder extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The name of this managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The metadata version of this managed folder. It increases + * whenever the metadata is updated. Used for preconditions and for detecting + * changes in metadata. Managed folders don't have a generation number. + * + * Generated from protobuf field int64 metageneration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $metageneration = 0; + /** + * Output only. The creation time of the managed folder. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The modification time of the managed folder. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The name of this managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * @type int|string $metageneration + * Output only. The metadata version of this managed folder. It increases + * whenever the metadata is updated. Used for preconditions and for detecting + * changes in metadata. Managed folders don't have a generation number. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation time of the managed folder. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The modification time of the managed folder. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The name of this managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The name of this managed folder. + * Format: + * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The metadata version of this managed folder. It increases + * whenever the metadata is updated. Used for preconditions and for detecting + * changes in metadata. Managed folders don't have a generation number. + * + * Generated from protobuf field int64 metageneration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getMetageneration() + { + return $this->metageneration; + } + + /** + * Output only. The metadata version of this managed folder. It increases + * whenever the metadata is updated. Used for preconditions and for detecting + * changes in metadata. Managed folders don't have a generation number. + * + * Generated from protobuf field int64 metageneration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setMetageneration($var) + { + GPBUtil::checkInt64($var); + $this->metageneration = $var; + + return $this; + } + + /** + * Output only. The creation time of the managed folder. + * + * 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 creation time of the managed folder. + * + * 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 modification time of the managed folder. + * + * 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 modification time of the managed folder. + * + * 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; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/PauseAnywhereCacheRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/PauseAnywhereCacheRequest.php new file mode 100644 index 000000000000..0b43c4b58a70 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/PauseAnywhereCacheRequest.php @@ -0,0 +1,128 @@ +google.storage.control.v2.PauseAnywhereCacheRequest + */ +class PauseAnywhereCacheRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name field in the request should be: + * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. This request is only + * idempotent if a `request_id` is provided. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. The name field in the request should be: + * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` + * Please see {@see StorageControlClient::anywhereCacheName()} for help formatting this field. + * + * @return \Google\Cloud\Storage\Control\V2\PauseAnywhereCacheRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name field in the request should be: + * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` + * @type string $request_id + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. This request is only + * idempotent if a `request_id` is provided. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name field in the request should be: + * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name field in the request should be: + * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. This request is only + * idempotent if a `request_id` is provided. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. This request is only + * idempotent if a `request_id` is provided. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/PendingRenameInfo.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/PendingRenameInfo.php new file mode 100644 index 000000000000..52172ad37498 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/PendingRenameInfo.php @@ -0,0 +1,67 @@ +google.storage.control.v2.PendingRenameInfo + */ +class PendingRenameInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The name of the rename operation. + * + * Generated from protobuf field string operation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $operation = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $operation + * Output only. The name of the rename operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of the rename operation. + * + * Generated from protobuf field string operation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getOperation() + { + return $this->operation; + } + + /** + * Output only. The name of the rename operation. + * + * Generated from protobuf field string operation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setOperation($var) + { + GPBUtil::checkString($var, True); + $this->operation = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/RenameFolderMetadata.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/RenameFolderMetadata.php new file mode 100644 index 000000000000..d9d0313fd1a7 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/RenameFolderMetadata.php @@ -0,0 +1,146 @@ +google.storage.control.v2.RenameFolderMetadata + */ +class RenameFolderMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Generic metadata for the long running operation. + * + * Generated from protobuf field .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + */ + protected $common_metadata = null; + /** + * The path of the source folder. + * + * Generated from protobuf field string source_folder_id = 2; + */ + protected $source_folder_id = ''; + /** + * The path of the destination folder. + * + * Generated from protobuf field string destination_folder_id = 3; + */ + protected $destination_folder_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata $common_metadata + * Generic metadata for the long running operation. + * @type string $source_folder_id + * The path of the source folder. + * @type string $destination_folder_id + * The path of the destination folder. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Generic metadata for the long running operation. + * + * Generated from protobuf field .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + * @return \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata|null + */ + public function getCommonMetadata() + { + return $this->common_metadata; + } + + public function hasCommonMetadata() + { + return isset($this->common_metadata); + } + + public function clearCommonMetadata() + { + unset($this->common_metadata); + } + + /** + * Generic metadata for the long running operation. + * + * Generated from protobuf field .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + * @param \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata $var + * @return $this + */ + public function setCommonMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata::class); + $this->common_metadata = $var; + + return $this; + } + + /** + * The path of the source folder. + * + * Generated from protobuf field string source_folder_id = 2; + * @return string + */ + public function getSourceFolderId() + { + return $this->source_folder_id; + } + + /** + * The path of the source folder. + * + * Generated from protobuf field string source_folder_id = 2; + * @param string $var + * @return $this + */ + public function setSourceFolderId($var) + { + GPBUtil::checkString($var, True); + $this->source_folder_id = $var; + + return $this; + } + + /** + * The path of the destination folder. + * + * Generated from protobuf field string destination_folder_id = 3; + * @return string + */ + public function getDestinationFolderId() + { + return $this->destination_folder_id; + } + + /** + * The path of the destination folder. + * + * Generated from protobuf field string destination_folder_id = 3; + * @param string $var + * @return $this + */ + public function setDestinationFolderId($var) + { + GPBUtil::checkString($var, True); + $this->destination_folder_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/RenameFolderRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/RenameFolderRequest.php new file mode 100644 index 000000000000..6d939843b450 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/RenameFolderRequest.php @@ -0,0 +1,261 @@ +google.storage.control.v2.RenameFolderRequest + */ +class RenameFolderRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the source folder being renamed. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * + * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The destination folder ID, e.g. `foo/bar/`. + * + * Generated from protobuf field string destination_folder_id = 8 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $destination_folder_id = ''; + /** + * Makes the operation only succeed conditional on whether the source + * folder's current metageneration matches the given value. + * + * Generated from protobuf field optional int64 if_metageneration_match = 4; + */ + protected $if_metageneration_match = null; + /** + * Makes the operation only succeed conditional on whether the source + * folder's current metageneration does not match the given value. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 5; + */ + protected $if_metageneration_not_match = null; + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. This request is only + * idempotent if a `request_id` is provided. + * + * Generated from protobuf field string request_id = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the source folder being renamed. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * Please see {@see StorageControlClient::folderName()} for help formatting this field. + * @param string $destinationFolderId Required. The destination folder ID, e.g. `foo/bar/`. + * + * @return \Google\Cloud\Storage\Control\V2\RenameFolderRequest + * + * @experimental + */ + public static function build(string $name, string $destinationFolderId): self + { + return (new self()) + ->setName($name) + ->setDestinationFolderId($destinationFolderId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the source folder being renamed. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * @type string $destination_folder_id + * Required. The destination folder ID, e.g. `foo/bar/`. + * @type int|string $if_metageneration_match + * Makes the operation only succeed conditional on whether the source + * folder's current metageneration matches the given value. + * @type int|string $if_metageneration_not_match + * Makes the operation only succeed conditional on whether the source + * folder's current metageneration does not match the given value. + * @type string $request_id + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. This request is only + * idempotent if a `request_id` is provided. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the source folder being renamed. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * + * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the source folder being renamed. + * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` + * + * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The destination folder ID, e.g. `foo/bar/`. + * + * Generated from protobuf field string destination_folder_id = 8 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDestinationFolderId() + { + return $this->destination_folder_id; + } + + /** + * Required. The destination folder ID, e.g. `foo/bar/`. + * + * Generated from protobuf field string destination_folder_id = 8 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDestinationFolderId($var) + { + GPBUtil::checkString($var, True); + $this->destination_folder_id = $var; + + return $this; + } + + /** + * Makes the operation only succeed conditional on whether the source + * folder's current metageneration matches the given value. + * + * Generated from protobuf field optional int64 if_metageneration_match = 4; + * @return int|string + */ + public function getIfMetagenerationMatch() + { + return isset($this->if_metageneration_match) ? $this->if_metageneration_match : 0; + } + + public function hasIfMetagenerationMatch() + { + return isset($this->if_metageneration_match); + } + + public function clearIfMetagenerationMatch() + { + unset($this->if_metageneration_match); + } + + /** + * Makes the operation only succeed conditional on whether the source + * folder's current metageneration matches the given value. + * + * Generated from protobuf field optional int64 if_metageneration_match = 4; + * @param int|string $var + * @return $this + */ + public function setIfMetagenerationMatch($var) + { + GPBUtil::checkInt64($var); + $this->if_metageneration_match = $var; + + return $this; + } + + /** + * Makes the operation only succeed conditional on whether the source + * folder's current metageneration does not match the given value. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 5; + * @return int|string + */ + public function getIfMetagenerationNotMatch() + { + return isset($this->if_metageneration_not_match) ? $this->if_metageneration_not_match : 0; + } + + public function hasIfMetagenerationNotMatch() + { + return isset($this->if_metageneration_not_match); + } + + public function clearIfMetagenerationNotMatch() + { + unset($this->if_metageneration_not_match); + } + + /** + * Makes the operation only succeed conditional on whether the source + * folder's current metageneration does not match the given value. + * + * Generated from protobuf field optional int64 if_metageneration_not_match = 5; + * @param int|string $var + * @return $this + */ + public function setIfMetagenerationNotMatch($var) + { + GPBUtil::checkInt64($var); + $this->if_metageneration_not_match = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. This request is only + * idempotent if a `request_id` is provided. + * + * Generated from protobuf field string request_id = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. This request is only + * idempotent if a `request_id` is provided. + * + * Generated from protobuf field string request_id = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ResumeAnywhereCacheRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ResumeAnywhereCacheRequest.php new file mode 100644 index 000000000000..9ea6a3bc7471 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ResumeAnywhereCacheRequest.php @@ -0,0 +1,128 @@ +google.storage.control.v2.ResumeAnywhereCacheRequest + */ +class ResumeAnywhereCacheRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name field in the request should be: + * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. This request is only + * idempotent if a `request_id` is provided. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. The name field in the request should be: + * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` + * Please see {@see StorageControlClient::anywhereCacheName()} for help formatting this field. + * + * @return \Google\Cloud\Storage\Control\V2\ResumeAnywhereCacheRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name field in the request should be: + * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` + * @type string $request_id + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. This request is only + * idempotent if a `request_id` is provided. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name field in the request should be: + * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name field in the request should be: + * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. This request is only + * idempotent if a `request_id` is provided. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. This request is only + * idempotent if a `request_id` is provided. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout.php new file mode 100644 index 000000000000..a48fbe8ef2ee --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout.php @@ -0,0 +1,239 @@ +google.storage.control.v2.StorageLayout + */ +class StorageLayout extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The name of the StorageLayout resource. + * Format: `projects/{project}/buckets/{bucket}/storageLayout` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The location of the bucket. + * + * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $location = ''; + /** + * Output only. The location type of the bucket (region, dual-region, + * multi-region, etc). + * + * Generated from protobuf field string location_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $location_type = ''; + /** + * Output only. The data placement configuration for custom dual region. If + * there is no configuration, this is not a custom dual region bucket. + * + * Generated from protobuf field .google.storage.control.v2.StorageLayout.CustomPlacementConfig custom_placement_config = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $custom_placement_config = null; + /** + * Output only. The bucket's hierarchical namespace configuration. If there is + * no configuration, the hierarchical namespace is disabled. + * + * Generated from protobuf field .google.storage.control.v2.StorageLayout.HierarchicalNamespace hierarchical_namespace = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $hierarchical_namespace = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The name of the StorageLayout resource. + * Format: `projects/{project}/buckets/{bucket}/storageLayout` + * @type string $location + * Output only. The location of the bucket. + * @type string $location_type + * Output only. The location type of the bucket (region, dual-region, + * multi-region, etc). + * @type \Google\Cloud\Storage\Control\V2\StorageLayout\CustomPlacementConfig $custom_placement_config + * Output only. The data placement configuration for custom dual region. If + * there is no configuration, this is not a custom dual region bucket. + * @type \Google\Cloud\Storage\Control\V2\StorageLayout\HierarchicalNamespace $hierarchical_namespace + * Output only. The bucket's hierarchical namespace configuration. If there is + * no configuration, the hierarchical namespace is disabled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of the StorageLayout resource. + * Format: `projects/{project}/buckets/{bucket}/storageLayout` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The name of the StorageLayout resource. + * Format: `projects/{project}/buckets/{bucket}/storageLayout` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The location of the bucket. + * + * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Output only. The location of the bucket. + * + * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * Output only. The location type of the bucket (region, dual-region, + * multi-region, etc). + * + * Generated from protobuf field string location_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLocationType() + { + return $this->location_type; + } + + /** + * Output only. The location type of the bucket (region, dual-region, + * multi-region, etc). + * + * Generated from protobuf field string location_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLocationType($var) + { + GPBUtil::checkString($var, True); + $this->location_type = $var; + + return $this; + } + + /** + * Output only. The data placement configuration for custom dual region. If + * there is no configuration, this is not a custom dual region bucket. + * + * Generated from protobuf field .google.storage.control.v2.StorageLayout.CustomPlacementConfig custom_placement_config = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Storage\Control\V2\StorageLayout\CustomPlacementConfig|null + */ + public function getCustomPlacementConfig() + { + return $this->custom_placement_config; + } + + public function hasCustomPlacementConfig() + { + return isset($this->custom_placement_config); + } + + public function clearCustomPlacementConfig() + { + unset($this->custom_placement_config); + } + + /** + * Output only. The data placement configuration for custom dual region. If + * there is no configuration, this is not a custom dual region bucket. + * + * Generated from protobuf field .google.storage.control.v2.StorageLayout.CustomPlacementConfig custom_placement_config = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Storage\Control\V2\StorageLayout\CustomPlacementConfig $var + * @return $this + */ + public function setCustomPlacementConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\StorageLayout\CustomPlacementConfig::class); + $this->custom_placement_config = $var; + + return $this; + } + + /** + * Output only. The bucket's hierarchical namespace configuration. If there is + * no configuration, the hierarchical namespace is disabled. + * + * Generated from protobuf field .google.storage.control.v2.StorageLayout.HierarchicalNamespace hierarchical_namespace = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Storage\Control\V2\StorageLayout\HierarchicalNamespace|null + */ + public function getHierarchicalNamespace() + { + return $this->hierarchical_namespace; + } + + public function hasHierarchicalNamespace() + { + return isset($this->hierarchical_namespace); + } + + public function clearHierarchicalNamespace() + { + unset($this->hierarchical_namespace); + } + + /** + * Output only. The bucket's hierarchical namespace configuration. If there is + * no configuration, the hierarchical namespace is disabled. + * + * Generated from protobuf field .google.storage.control.v2.StorageLayout.HierarchicalNamespace hierarchical_namespace = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Storage\Control\V2\StorageLayout\HierarchicalNamespace $var + * @return $this + */ + public function setHierarchicalNamespace($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\StorageLayout\HierarchicalNamespace::class); + $this->hierarchical_namespace = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout/CustomPlacementConfig.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout/CustomPlacementConfig.php new file mode 100644 index 000000000000..0bda81218e0a --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout/CustomPlacementConfig.php @@ -0,0 +1,72 @@ +google.storage.control.v2.StorageLayout.CustomPlacementConfig + */ +class CustomPlacementConfig extends \Google\Protobuf\Internal\Message +{ + /** + * List of locations to use for data placement. + * + * Generated from protobuf field repeated string data_locations = 1; + */ + private $data_locations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $data_locations + * List of locations to use for data placement. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * List of locations to use for data placement. + * + * Generated from protobuf field repeated string data_locations = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDataLocations() + { + return $this->data_locations; + } + + /** + * List of locations to use for data placement. + * + * Generated from protobuf field repeated string data_locations = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDataLocations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->data_locations = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CustomPlacementConfig::class, \Google\Cloud\Storage\Control\V2\StorageLayout_CustomPlacementConfig::class); + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout/HierarchicalNamespace.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout/HierarchicalNamespace.php new file mode 100644 index 000000000000..34e91aff6d81 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout/HierarchicalNamespace.php @@ -0,0 +1,70 @@ +google.storage.control.v2.StorageLayout.HierarchicalNamespace + */ +class HierarchicalNamespace extends \Google\Protobuf\Internal\Message +{ + /** + * Enables the hierarchical namespace feature. + * + * Generated from protobuf field bool enabled = 1; + */ + protected $enabled = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enabled + * Enables the hierarchical namespace feature. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Enables the hierarchical namespace feature. + * + * Generated from protobuf field bool enabled = 1; + * @return bool + */ + public function getEnabled() + { + return $this->enabled; + } + + /** + * Enables the hierarchical namespace feature. + * + * Generated from protobuf field bool enabled = 1; + * @param bool $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkBool($var); + $this->enabled = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(HierarchicalNamespace::class, \Google\Cloud\Storage\Control\V2\StorageLayout_HierarchicalNamespace::class); + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateAnywhereCacheMetadata.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateAnywhereCacheMetadata.php new file mode 100644 index 000000000000..df41790789f0 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateAnywhereCacheMetadata.php @@ -0,0 +1,274 @@ +google.storage.control.v2.UpdateAnywhereCacheMetadata + */ +class UpdateAnywhereCacheMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Generic metadata for the long running operation. + * + * Generated from protobuf field .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + */ + protected $common_metadata = null; + /** + * Anywhere Cache ID. + * + * Generated from protobuf field optional string anywhere_cache_id = 2; + */ + protected $anywhere_cache_id = null; + /** + * The zone in which the cache instance is running. For example, + * us-central1-a. + * + * Generated from protobuf field optional string zone = 5; + */ + protected $zone = null; + /** + * Anywhere Cache entry's TTL between 1h and 7days. A cache-level config that + * is applied to all new cache entries on admission. If `ttl` is pending + * update, this field equals to the new value specified in the Update request. + * + * Generated from protobuf field optional .google.protobuf.Duration ttl = 3; + */ + protected $ttl = null; + /** + * L4 Cache entry Admission Policy in kebab-case (e.g., + * "admit-on-first-miss"). If `admission_policy` is pending + * update, this field equals to the new value specified in the Update request. + * + * Generated from protobuf field optional string admission_policy = 4; + */ + protected $admission_policy = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata $common_metadata + * Generic metadata for the long running operation. + * @type string $anywhere_cache_id + * Anywhere Cache ID. + * @type string $zone + * The zone in which the cache instance is running. For example, + * us-central1-a. + * @type \Google\Protobuf\Duration $ttl + * Anywhere Cache entry's TTL between 1h and 7days. A cache-level config that + * is applied to all new cache entries on admission. If `ttl` is pending + * update, this field equals to the new value specified in the Update request. + * @type string $admission_policy + * L4 Cache entry Admission Policy in kebab-case (e.g., + * "admit-on-first-miss"). If `admission_policy` is pending + * update, this field equals to the new value specified in the Update request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Generic metadata for the long running operation. + * + * Generated from protobuf field .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + * @return \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata|null + */ + public function getCommonMetadata() + { + return $this->common_metadata; + } + + public function hasCommonMetadata() + { + return isset($this->common_metadata); + } + + public function clearCommonMetadata() + { + unset($this->common_metadata); + } + + /** + * Generic metadata for the long running operation. + * + * Generated from protobuf field .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + * @param \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata $var + * @return $this + */ + public function setCommonMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata::class); + $this->common_metadata = $var; + + return $this; + } + + /** + * Anywhere Cache ID. + * + * Generated from protobuf field optional string anywhere_cache_id = 2; + * @return string + */ + public function getAnywhereCacheId() + { + return isset($this->anywhere_cache_id) ? $this->anywhere_cache_id : ''; + } + + public function hasAnywhereCacheId() + { + return isset($this->anywhere_cache_id); + } + + public function clearAnywhereCacheId() + { + unset($this->anywhere_cache_id); + } + + /** + * Anywhere Cache ID. + * + * Generated from protobuf field optional string anywhere_cache_id = 2; + * @param string $var + * @return $this + */ + public function setAnywhereCacheId($var) + { + GPBUtil::checkString($var, True); + $this->anywhere_cache_id = $var; + + return $this; + } + + /** + * The zone in which the cache instance is running. For example, + * us-central1-a. + * + * Generated from protobuf field optional string zone = 5; + * @return string + */ + public function getZone() + { + return isset($this->zone) ? $this->zone : ''; + } + + public function hasZone() + { + return isset($this->zone); + } + + public function clearZone() + { + unset($this->zone); + } + + /** + * The zone in which the cache instance is running. For example, + * us-central1-a. + * + * Generated from protobuf field optional string zone = 5; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + + /** + * Anywhere Cache entry's TTL between 1h and 7days. A cache-level config that + * is applied to all new cache entries on admission. If `ttl` is pending + * update, this field equals to the new value specified in the Update request. + * + * Generated from protobuf field optional .google.protobuf.Duration ttl = 3; + * @return \Google\Protobuf\Duration|null + */ + public function getTtl() + { + return $this->ttl; + } + + public function hasTtl() + { + return isset($this->ttl); + } + + public function clearTtl() + { + unset($this->ttl); + } + + /** + * Anywhere Cache entry's TTL between 1h and 7days. A cache-level config that + * is applied to all new cache entries on admission. If `ttl` is pending + * update, this field equals to the new value specified in the Update request. + * + * Generated from protobuf field optional .google.protobuf.Duration ttl = 3; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTtl($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->ttl = $var; + + return $this; + } + + /** + * L4 Cache entry Admission Policy in kebab-case (e.g., + * "admit-on-first-miss"). If `admission_policy` is pending + * update, this field equals to the new value specified in the Update request. + * + * Generated from protobuf field optional string admission_policy = 4; + * @return string + */ + public function getAdmissionPolicy() + { + return isset($this->admission_policy) ? $this->admission_policy : ''; + } + + public function hasAdmissionPolicy() + { + return isset($this->admission_policy); + } + + public function clearAdmissionPolicy() + { + unset($this->admission_policy); + } + + /** + * L4 Cache entry Admission Policy in kebab-case (e.g., + * "admit-on-first-miss"). If `admission_policy` is pending + * update, this field equals to the new value specified in the Update request. + * + * Generated from protobuf field optional string admission_policy = 4; + * @param string $var + * @return $this + */ + public function setAdmissionPolicy($var) + { + GPBUtil::checkString($var, True); + $this->admission_policy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateAnywhereCacheRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateAnywhereCacheRequest.php new file mode 100644 index 000000000000..b1cc13f7a574 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateAnywhereCacheRequest.php @@ -0,0 +1,210 @@ +google.storage.control.v2.UpdateAnywhereCacheRequest + */ +class UpdateAnywhereCacheRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Anywhere Cache instance to be updated. + * + * Generated from protobuf field .google.storage.control.v2.AnywhereCache anywhere_cache = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $anywhere_cache = null; + /** + * Required. List of fields to be updated. Mutable fields of AnywhereCache + * include `ttl` and `admission_policy`. + * To specify ALL fields, specify a single field with the value `*`. Note: We + * recommend against doing this. If a new field is introduced at a later time, + * an older client updating with the `*` may accidentally reset the new + * field's value. + * Not specifying any fields is an error. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. This request is only + * idempotent if a `request_id` is provided. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\Storage\Control\V2\AnywhereCache $anywhereCache Required. The Anywhere Cache instance to be updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. List of fields to be updated. Mutable fields of AnywhereCache + * include `ttl` and `admission_policy`. + * + * To specify ALL fields, specify a single field with the value `*`. Note: We + * recommend against doing this. If a new field is introduced at a later time, + * an older client updating with the `*` may accidentally reset the new + * field's value. + * + * Not specifying any fields is an error. + * + * @return \Google\Cloud\Storage\Control\V2\UpdateAnywhereCacheRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Storage\Control\V2\AnywhereCache $anywhereCache, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setAnywhereCache($anywhereCache) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Storage\Control\V2\AnywhereCache $anywhere_cache + * Required. The Anywhere Cache instance to be updated. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. List of fields to be updated. Mutable fields of AnywhereCache + * include `ttl` and `admission_policy`. + * To specify ALL fields, specify a single field with the value `*`. Note: We + * recommend against doing this. If a new field is introduced at a later time, + * an older client updating with the `*` may accidentally reset the new + * field's value. + * Not specifying any fields is an error. + * @type string $request_id + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. This request is only + * idempotent if a `request_id` is provided. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Anywhere Cache instance to be updated. + * + * Generated from protobuf field .google.storage.control.v2.AnywhereCache anywhere_cache = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Storage\Control\V2\AnywhereCache|null + */ + public function getAnywhereCache() + { + return $this->anywhere_cache; + } + + public function hasAnywhereCache() + { + return isset($this->anywhere_cache); + } + + public function clearAnywhereCache() + { + unset($this->anywhere_cache); + } + + /** + * Required. The Anywhere Cache instance to be updated. + * + * Generated from protobuf field .google.storage.control.v2.AnywhereCache anywhere_cache = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Storage\Control\V2\AnywhereCache $var + * @return $this + */ + public function setAnywhereCache($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\AnywhereCache::class); + $this->anywhere_cache = $var; + + return $this; + } + + /** + * Required. List of fields to be updated. Mutable fields of AnywhereCache + * include `ttl` and `admission_policy`. + * To specify ALL fields, specify a single field with the value `*`. Note: We + * recommend against doing this. If a new field is introduced at a later time, + * an older client updating with the `*` may accidentally reset the new + * field's value. + * Not specifying any fields is an error. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. List of fields to be updated. Mutable fields of AnywhereCache + * include `ttl` and `admission_policy`. + * To specify ALL fields, specify a single field with the value `*`. Note: We + * recommend against doing this. If a new field is introduced at a later time, + * an older client updating with the `*` may accidentally reset the new + * field's value. + * Not specifying any fields is an error. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. This request is only + * idempotent if a `request_id` is provided. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. UUID is the recommended + * format, but other formats are still accepted. This request is only + * idempotent if a `request_id` is provided. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateFolderIntelligenceConfigRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateFolderIntelligenceConfigRequest.php new file mode 100644 index 000000000000..006e1da7cae4 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateFolderIntelligenceConfigRequest.php @@ -0,0 +1,189 @@ +google.storage.control.v2.UpdateFolderIntelligenceConfigRequest + */ +class UpdateFolderIntelligenceConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The `IntelligenceConfig` resource to be updated. + * + * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $intelligence_config = null; + /** + * Required. The `update_mask` that specifies the fields within the + * `IntelligenceConfig` resource that should be modified by this update. Only + * the listed fields are updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Optional. The ID that uniquely identifies the request, preventing duplicate + * processing. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\Storage\Control\V2\IntelligenceConfig $intelligenceConfig Required. The `IntelligenceConfig` resource to be updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. The `update_mask` that specifies the fields within the + * `IntelligenceConfig` resource that should be modified by this update. Only + * the listed fields are updated. + * + * @return \Google\Cloud\Storage\Control\V2\UpdateFolderIntelligenceConfigRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Storage\Control\V2\IntelligenceConfig $intelligenceConfig, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setIntelligenceConfig($intelligenceConfig) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Storage\Control\V2\IntelligenceConfig $intelligence_config + * Required. The `IntelligenceConfig` resource to be updated. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The `update_mask` that specifies the fields within the + * `IntelligenceConfig` resource that should be modified by this update. Only + * the listed fields are updated. + * @type string $request_id + * Optional. The ID that uniquely identifies the request, preventing duplicate + * processing. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. The `IntelligenceConfig` resource to be updated. + * + * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Storage\Control\V2\IntelligenceConfig|null + */ + public function getIntelligenceConfig() + { + return $this->intelligence_config; + } + + public function hasIntelligenceConfig() + { + return isset($this->intelligence_config); + } + + public function clearIntelligenceConfig() + { + unset($this->intelligence_config); + } + + /** + * Required. The `IntelligenceConfig` resource to be updated. + * + * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Storage\Control\V2\IntelligenceConfig $var + * @return $this + */ + public function setIntelligenceConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\IntelligenceConfig::class); + $this->intelligence_config = $var; + + return $this; + } + + /** + * Required. The `update_mask` that specifies the fields within the + * `IntelligenceConfig` resource that should be modified by this update. Only + * the listed fields are updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The `update_mask` that specifies the fields within the + * `IntelligenceConfig` resource that should be modified by this update. Only + * the listed fields are updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Optional. The ID that uniquely identifies the request, preventing duplicate + * processing. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. The ID that uniquely identifies the request, preventing duplicate + * processing. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateOrganizationIntelligenceConfigRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateOrganizationIntelligenceConfigRequest.php new file mode 100644 index 000000000000..d30db75be5a6 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateOrganizationIntelligenceConfigRequest.php @@ -0,0 +1,189 @@ +google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest + */ +class UpdateOrganizationIntelligenceConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The `IntelligenceConfig` resource to be updated. + * + * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $intelligence_config = null; + /** + * Required. The `update_mask` that specifies the fields within the + * `IntelligenceConfig` resource that should be modified by this update. Only + * the listed fields are updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Optional. The ID that uniquely identifies the request, preventing duplicate + * processing. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\Storage\Control\V2\IntelligenceConfig $intelligenceConfig Required. The `IntelligenceConfig` resource to be updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. The `update_mask` that specifies the fields within the + * `IntelligenceConfig` resource that should be modified by this update. Only + * the listed fields are updated. + * + * @return \Google\Cloud\Storage\Control\V2\UpdateOrganizationIntelligenceConfigRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Storage\Control\V2\IntelligenceConfig $intelligenceConfig, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setIntelligenceConfig($intelligenceConfig) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Storage\Control\V2\IntelligenceConfig $intelligence_config + * Required. The `IntelligenceConfig` resource to be updated. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The `update_mask` that specifies the fields within the + * `IntelligenceConfig` resource that should be modified by this update. Only + * the listed fields are updated. + * @type string $request_id + * Optional. The ID that uniquely identifies the request, preventing duplicate + * processing. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. The `IntelligenceConfig` resource to be updated. + * + * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Storage\Control\V2\IntelligenceConfig|null + */ + public function getIntelligenceConfig() + { + return $this->intelligence_config; + } + + public function hasIntelligenceConfig() + { + return isset($this->intelligence_config); + } + + public function clearIntelligenceConfig() + { + unset($this->intelligence_config); + } + + /** + * Required. The `IntelligenceConfig` resource to be updated. + * + * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Storage\Control\V2\IntelligenceConfig $var + * @return $this + */ + public function setIntelligenceConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\IntelligenceConfig::class); + $this->intelligence_config = $var; + + return $this; + } + + /** + * Required. The `update_mask` that specifies the fields within the + * `IntelligenceConfig` resource that should be modified by this update. Only + * the listed fields are updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The `update_mask` that specifies the fields within the + * `IntelligenceConfig` resource that should be modified by this update. Only + * the listed fields are updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Optional. The ID that uniquely identifies the request, preventing duplicate + * processing. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. The ID that uniquely identifies the request, preventing duplicate + * processing. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateProjectIntelligenceConfigRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateProjectIntelligenceConfigRequest.php new file mode 100644 index 000000000000..72012d4cad8c --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateProjectIntelligenceConfigRequest.php @@ -0,0 +1,189 @@ +google.storage.control.v2.UpdateProjectIntelligenceConfigRequest + */ +class UpdateProjectIntelligenceConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The `IntelligenceConfig` resource to be updated. + * + * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $intelligence_config = null; + /** + * Required. The `update_mask` that specifies the fields within the + * `IntelligenceConfig` resource that should be modified by this update. Only + * the listed fields are updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Optional. The ID that uniquely identifies the request, preventing duplicate + * processing. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\Storage\Control\V2\IntelligenceConfig $intelligenceConfig Required. The `IntelligenceConfig` resource to be updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. The `update_mask` that specifies the fields within the + * `IntelligenceConfig` resource that should be modified by this update. Only + * the listed fields are updated. + * + * @return \Google\Cloud\Storage\Control\V2\UpdateProjectIntelligenceConfigRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Storage\Control\V2\IntelligenceConfig $intelligenceConfig, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setIntelligenceConfig($intelligenceConfig) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Storage\Control\V2\IntelligenceConfig $intelligence_config + * Required. The `IntelligenceConfig` resource to be updated. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The `update_mask` that specifies the fields within the + * `IntelligenceConfig` resource that should be modified by this update. Only + * the listed fields are updated. + * @type string $request_id + * Optional. The ID that uniquely identifies the request, preventing duplicate + * processing. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); + parent::__construct($data); + } + + /** + * Required. The `IntelligenceConfig` resource to be updated. + * + * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Storage\Control\V2\IntelligenceConfig|null + */ + public function getIntelligenceConfig() + { + return $this->intelligence_config; + } + + public function hasIntelligenceConfig() + { + return isset($this->intelligence_config); + } + + public function clearIntelligenceConfig() + { + unset($this->intelligence_config); + } + + /** + * Required. The `IntelligenceConfig` resource to be updated. + * + * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Storage\Control\V2\IntelligenceConfig $var + * @return $this + */ + public function setIntelligenceConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\IntelligenceConfig::class); + $this->intelligence_config = $var; + + return $this; + } + + /** + * Required. The `update_mask` that specifies the fields within the + * `IntelligenceConfig` resource that should be modified by this update. Only + * the listed fields are updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The `update_mask` that specifies the fields within the + * `IntelligenceConfig` resource that should be modified by this update. Only + * the listed fields are updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Optional. The ID that uniquely identifies the request, preventing duplicate + * processing. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. The ID that uniquely identifies the request, preventing duplicate + * processing. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_anywhere_cache.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_anywhere_cache.php new file mode 100644 index 000000000000..f1abdf077849 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_anywhere_cache.php @@ -0,0 +1,86 @@ +setParent($formattedParent) + ->setAnywhereCache($anywhereCache); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $storageControlClient->createAnywhereCache($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AnywhereCache $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = StorageControlClient::bucketName('[PROJECT]', '[BUCKET]'); + + create_anywhere_cache_sample($formattedParent); +} +// [END storage_v2_generated_StorageControl_CreateAnywhereCache_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_folder.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_folder.php new file mode 100644 index 000000000000..a3d84c55b7fe --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_folder.php @@ -0,0 +1,82 @@ +setParent($formattedParent) + ->setFolder($folder) + ->setFolderId($folderId); + + // Call the API and handle any network failures. + try { + /** @var Folder $response */ + $response = $storageControlClient->createFolder($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = StorageControlClient::bucketName('[PROJECT]', '[BUCKET]'); + $folderId = '[FOLDER_ID]'; + + create_folder_sample($formattedParent, $folderId); +} +// [END storage_v2_generated_StorageControl_CreateFolder_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_managed_folder.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_managed_folder.php new file mode 100644 index 000000000000..115da2605b90 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_managed_folder.php @@ -0,0 +1,77 @@ +setParent($formattedParent) + ->setManagedFolder($managedFolder) + ->setManagedFolderId($managedFolderId); + + // Call the API and handle any network failures. + try { + /** @var ManagedFolder $response */ + $response = $storageControlClient->createManagedFolder($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = StorageControlClient::bucketName('[PROJECT]', '[BUCKET]'); + $managedFolderId = '[MANAGED_FOLDER_ID]'; + + create_managed_folder_sample($formattedParent, $managedFolderId); +} +// [END storage_v2_generated_StorageControl_CreateManagedFolder_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/delete_folder.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/delete_folder.php new file mode 100644 index 000000000000..a992870e4ed6 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/delete_folder.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $storageControlClient->deleteFolder($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = StorageControlClient::folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); + + delete_folder_sample($formattedName); +} +// [END storage_v2_generated_StorageControl_DeleteFolder_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/delete_folder_recursive.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/delete_folder_recursive.php new file mode 100644 index 000000000000..8489e59e4945 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/delete_folder_recursive.php @@ -0,0 +1,83 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $storageControlClient->deleteFolderRecursive($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 = StorageControlClient::folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); + + delete_folder_recursive_sample($formattedName); +} +// [END storage_v2_generated_StorageControl_DeleteFolderRecursive_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/delete_managed_folder.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/delete_managed_folder.php new file mode 100644 index 000000000000..086301f28714 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/delete_managed_folder.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $storageControlClient->deleteManagedFolder($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = StorageControlClient::managedFolderName( + '[PROJECT]', + '[BUCKET]', + '[MANAGED_FOLDER]' + ); + + delete_managed_folder_sample($formattedName); +} +// [END storage_v2_generated_StorageControl_DeleteManagedFolder_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/disable_anywhere_cache.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/disable_anywhere_cache.php new file mode 100644 index 000000000000..64bdbd4a789b --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/disable_anywhere_cache.php @@ -0,0 +1,79 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var AnywhereCache $response */ + $response = $storageControlClient->disableAnywhereCache($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = StorageControlClient::anywhereCacheName( + '[PROJECT]', + '[BUCKET]', + '[ANYWHERE_CACHE]' + ); + + disable_anywhere_cache_sample($formattedName); +} +// [END storage_v2_generated_StorageControl_DisableAnywhereCache_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_anywhere_cache.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_anywhere_cache.php new file mode 100644 index 000000000000..1176e557d53e --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_anywhere_cache.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var AnywhereCache $response */ + $response = $storageControlClient->getAnywhereCache($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = StorageControlClient::anywhereCacheName( + '[PROJECT]', + '[BUCKET]', + '[ANYWHERE_CACHE]' + ); + + get_anywhere_cache_sample($formattedName); +} +// [END storage_v2_generated_StorageControl_GetAnywhereCache_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_folder.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_folder.php new file mode 100644 index 000000000000..c8bcd26c27bf --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_folder.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Folder $response */ + $response = $storageControlClient->getFolder($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = StorageControlClient::folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); + + get_folder_sample($formattedName); +} +// [END storage_v2_generated_StorageControl_GetFolder_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_folder_intelligence_config.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_folder_intelligence_config.php new file mode 100644 index 000000000000..363c7e925757 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_folder_intelligence_config.php @@ -0,0 +1,74 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var IntelligenceConfig $response */ + $response = $storageControlClient->getFolderIntelligenceConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = StorageControlClient::intelligenceConfigName('[FOLDER]', '[LOCATION]'); + + get_folder_intelligence_config_sample($formattedName); +} +// [END storage_v2_generated_StorageControl_GetFolderIntelligenceConfig_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_iam_policy.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_iam_policy.php new file mode 100644 index 000000000000..9f4534c8b9f7 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_iam_policy.php @@ -0,0 +1,75 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $storageControlClient->getIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END storage_v2_generated_StorageControl_GetIamPolicy_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_managed_folder.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_managed_folder.php new file mode 100644 index 000000000000..1a8f281b262c --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_managed_folder.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ManagedFolder $response */ + $response = $storageControlClient->getManagedFolder($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = StorageControlClient::managedFolderName( + '[PROJECT]', + '[BUCKET]', + '[MANAGED_FOLDER]' + ); + + get_managed_folder_sample($formattedName); +} +// [END storage_v2_generated_StorageControl_GetManagedFolder_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_organization_intelligence_config.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_organization_intelligence_config.php new file mode 100644 index 000000000000..a50fa068a7d1 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_organization_intelligence_config.php @@ -0,0 +1,74 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var IntelligenceConfig $response */ + $response = $storageControlClient->getOrganizationIntelligenceConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = StorageControlClient::intelligenceConfigName('[FOLDER]', '[LOCATION]'); + + get_organization_intelligence_config_sample($formattedName); +} +// [END storage_v2_generated_StorageControl_GetOrganizationIntelligenceConfig_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_project_intelligence_config.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_project_intelligence_config.php new file mode 100644 index 000000000000..c5ffef33f7be --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_project_intelligence_config.php @@ -0,0 +1,74 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var IntelligenceConfig $response */ + $response = $storageControlClient->getProjectIntelligenceConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = StorageControlClient::intelligenceConfigName('[FOLDER]', '[LOCATION]'); + + get_project_intelligence_config_sample($formattedName); +} +// [END storage_v2_generated_StorageControl_GetProjectIntelligenceConfig_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_storage_layout.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_storage_layout.php new file mode 100644 index 000000000000..ee089863ac32 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_storage_layout.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var StorageLayout $response */ + $response = $storageControlClient->getStorageLayout($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = StorageControlClient::storageLayoutName('[PROJECT]', '[BUCKET]'); + + get_storage_layout_sample($formattedName); +} +// [END storage_v2_generated_StorageControl_GetStorageLayout_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_anywhere_caches.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_anywhere_caches.php new file mode 100644 index 000000000000..6d6754a83567 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_anywhere_caches.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $storageControlClient->listAnywhereCaches($request); + + /** @var AnywhereCache $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = StorageControlClient::bucketName('[PROJECT]', '[BUCKET]'); + + list_anywhere_caches_sample($formattedParent); +} +// [END storage_v2_generated_StorageControl_ListAnywhereCaches_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_folders.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_folders.php new file mode 100644 index 000000000000..20a07c85fc6b --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_folders.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $storageControlClient->listFolders($request); + + /** @var Folder $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = StorageControlClient::bucketName('[PROJECT]', '[BUCKET]'); + + list_folders_sample($formattedParent); +} +// [END storage_v2_generated_StorageControl_ListFolders_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_managed_folders.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_managed_folders.php new file mode 100644 index 000000000000..809d0486c77a --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_managed_folders.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $storageControlClient->listManagedFolders($request); + + /** @var ManagedFolder $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = StorageControlClient::bucketName('[PROJECT]', '[BUCKET]'); + + list_managed_folders_sample($formattedParent); +} +// [END storage_v2_generated_StorageControl_ListManagedFolders_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/pause_anywhere_cache.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/pause_anywhere_cache.php new file mode 100644 index 000000000000..b9deb9aba4fa --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/pause_anywhere_cache.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var AnywhereCache $response */ + $response = $storageControlClient->pauseAnywhereCache($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = StorageControlClient::anywhereCacheName( + '[PROJECT]', + '[BUCKET]', + '[ANYWHERE_CACHE]' + ); + + pause_anywhere_cache_sample($formattedName); +} +// [END storage_v2_generated_StorageControl_PauseAnywhereCache_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/rename_folder.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/rename_folder.php new file mode 100644 index 000000000000..0e4ec186638c --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/rename_folder.php @@ -0,0 +1,90 @@ +setName($formattedName) + ->setDestinationFolderId($destinationFolderId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $storageControlClient->renameFolder($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Folder $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = StorageControlClient::folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); + $destinationFolderId = '[DESTINATION_FOLDER_ID]'; + + rename_folder_sample($formattedName, $destinationFolderId); +} +// [END storage_v2_generated_StorageControl_RenameFolder_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/resume_anywhere_cache.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/resume_anywhere_cache.php new file mode 100644 index 000000000000..c2ae6bf6690f --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/resume_anywhere_cache.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var AnywhereCache $response */ + $response = $storageControlClient->resumeAnywhereCache($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = StorageControlClient::anywhereCacheName( + '[PROJECT]', + '[BUCKET]', + '[ANYWHERE_CACHE]' + ); + + resume_anywhere_cache_sample($formattedName); +} +// [END storage_v2_generated_StorageControl_ResumeAnywhereCache_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/set_iam_policy.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/set_iam_policy.php new file mode 100644 index 000000000000..8c1c9cfa0f7b --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $storageControlClient->setIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END storage_v2_generated_StorageControl_SetIamPolicy_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/test_iam_permissions.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/test_iam_permissions.php new file mode 100644 index 000000000000..086e576654b7 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $storageControlClient->testIamPermissions($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END storage_v2_generated_StorageControl_TestIamPermissions_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/update_anywhere_cache.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/update_anywhere_cache.php new file mode 100644 index 000000000000..cf85b1f97fb6 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/update_anywhere_cache.php @@ -0,0 +1,75 @@ +setAnywhereCache($anywhereCache) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $storageControlClient->updateAnywhereCache($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AnywhereCache $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END storage_v2_generated_StorageControl_UpdateAnywhereCache_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/update_folder_intelligence_config.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/update_folder_intelligence_config.php new file mode 100644 index 000000000000..52f9ea64a70c --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/update_folder_intelligence_config.php @@ -0,0 +1,62 @@ +setIntelligenceConfig($intelligenceConfig) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var IntelligenceConfig $response */ + $response = $storageControlClient->updateFolderIntelligenceConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END storage_v2_generated_StorageControl_UpdateFolderIntelligenceConfig_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/update_organization_intelligence_config.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/update_organization_intelligence_config.php new file mode 100644 index 000000000000..b4540c406cd5 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/update_organization_intelligence_config.php @@ -0,0 +1,62 @@ +setIntelligenceConfig($intelligenceConfig) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var IntelligenceConfig $response */ + $response = $storageControlClient->updateOrganizationIntelligenceConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END storage_v2_generated_StorageControl_UpdateOrganizationIntelligenceConfig_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/update_project_intelligence_config.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/update_project_intelligence_config.php new file mode 100644 index 000000000000..068360da11ff --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/update_project_intelligence_config.php @@ -0,0 +1,62 @@ +setIntelligenceConfig($intelligenceConfig) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var IntelligenceConfig $response */ + $response = $storageControlClient->updateProjectIntelligenceConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END storage_v2_generated_StorageControl_UpdateProjectIntelligenceConfig_sync] diff --git a/owl-bot-staging/StorageControl/v2/src/V2/Client/StorageControlClient.php b/owl-bot-staging/StorageControl/v2/src/V2/Client/StorageControlClient.php new file mode 100644 index 000000000000..bd1a30d659a1 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/src/V2/Client/StorageControlClient.php @@ -0,0 +1,1224 @@ + createAnywhereCacheAsync(CreateAnywhereCacheRequest $request, array $optionalArgs = []) + * @method PromiseInterface createFolderAsync(CreateFolderRequest $request, array $optionalArgs = []) + * @method PromiseInterface createManagedFolderAsync(CreateManagedFolderRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteFolderAsync(DeleteFolderRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteFolderRecursiveAsync(DeleteFolderRecursiveRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteManagedFolderAsync(DeleteManagedFolderRequest $request, array $optionalArgs = []) + * @method PromiseInterface disableAnywhereCacheAsync(DisableAnywhereCacheRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAnywhereCacheAsync(GetAnywhereCacheRequest $request, array $optionalArgs = []) + * @method PromiseInterface getFolderAsync(GetFolderRequest $request, array $optionalArgs = []) + * @method PromiseInterface getFolderIntelligenceConfigAsync(GetFolderIntelligenceConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getManagedFolderAsync(GetManagedFolderRequest $request, array $optionalArgs = []) + * @method PromiseInterface getOrganizationIntelligenceConfigAsync(GetOrganizationIntelligenceConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getProjectIntelligenceConfigAsync(GetProjectIntelligenceConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getStorageLayoutAsync(GetStorageLayoutRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAnywhereCachesAsync(ListAnywhereCachesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listFoldersAsync(ListFoldersRequest $request, array $optionalArgs = []) + * @method PromiseInterface listManagedFoldersAsync(ListManagedFoldersRequest $request, array $optionalArgs = []) + * @method PromiseInterface pauseAnywhereCacheAsync(PauseAnywhereCacheRequest $request, array $optionalArgs = []) + * @method PromiseInterface renameFolderAsync(RenameFolderRequest $request, array $optionalArgs = []) + * @method PromiseInterface resumeAnywhereCacheAsync(ResumeAnywhereCacheRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateAnywhereCacheAsync(UpdateAnywhereCacheRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateFolderIntelligenceConfigAsync(UpdateFolderIntelligenceConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateOrganizationIntelligenceConfigAsync(UpdateOrganizationIntelligenceConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateProjectIntelligenceConfigAsync(UpdateProjectIntelligenceConfigRequest $request, array $optionalArgs = []) + */ +final class StorageControlClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.storage.control.v2.StorageControl'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'storage.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'storage.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-platform.read-only', + 'https://www.googleapis.com/auth/devstorage.full_control', + 'https://www.googleapis.com/auth/devstorage.read_only', + 'https://www.googleapis.com/auth/devstorage.read_write', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/storage_control_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/storage_control_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/storage_control_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/storage_control_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 = $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 + * anywhere_cache resource. + * + * @param string $project + * @param string $bucket + * @param string $anywhereCache + * + * @return string The formatted anywhere_cache resource. + */ + public static function anywhereCacheName(string $project, string $bucket, string $anywhereCache): string + { + return self::getPathTemplate('anywhereCache')->render([ + 'project' => $project, + 'bucket' => $bucket, + 'anywhere_cache' => $anywhereCache, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a bucket + * resource. + * + * @param string $project + * @param string $bucket + * + * @return string The formatted bucket resource. + */ + public static function bucketName(string $project, string $bucket): string + { + return self::getPathTemplate('bucket')->render([ + 'project' => $project, + 'bucket' => $bucket, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a folder + * resource. + * + * @param string $project + * @param string $bucket + * @param string $folder + * + * @return string The formatted folder resource. + */ + public static function folderName(string $project, string $bucket, string $folder): string + { + return self::getPathTemplate('folder')->render([ + 'project' => $project, + 'bucket' => $bucket, + 'folder' => $folder, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_location_intelligenceConfig resource. + * + * @param string $folder + * @param string $location + * + * @return string The formatted folder_location_intelligenceConfig resource. + */ + public static function folderLocationIntelligenceConfigName(string $folder, string $location): string + { + return self::getPathTemplate('folderLocationIntelligenceConfig')->render([ + 'folder' => $folder, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * intelligence_config resource. + * + * @param string $folder + * @param string $location + * + * @return string The formatted intelligence_config resource. + */ + public static function intelligenceConfigName(string $folder, string $location): string + { + return self::getPathTemplate('intelligenceConfig')->render([ + 'folder' => $folder, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * managed_folder resource. + * + * @param string $project + * @param string $bucket + * @param string $managedFolder + * + * @return string The formatted managed_folder resource. + */ + public static function managedFolderName(string $project, string $bucket, string $managedFolder): string + { + return self::getPathTemplate('managedFolder')->render([ + 'project' => $project, + 'bucket' => $bucket, + 'managed_folder' => $managedFolder, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * org_location_intelligenceConfig resource. + * + * @param string $org + * @param string $location + * + * @return string The formatted org_location_intelligenceConfig resource. + */ + public static function orgLocationIntelligenceConfigName(string $org, string $location): string + { + return self::getPathTemplate('orgLocationIntelligenceConfig')->render([ + 'org' => $org, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_intelligenceConfig resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted project_location_intelligenceConfig resource. + */ + public static function projectLocationIntelligenceConfigName(string $project, string $location): string + { + return self::getPathTemplate('projectLocationIntelligenceConfig')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * storage_layout resource. + * + * @param string $project + * @param string $bucket + * + * @return string The formatted storage_layout resource. + */ + public static function storageLayoutName(string $project, string $bucket): string + { + return self::getPathTemplate('storageLayout')->render([ + 'project' => $project, + 'bucket' => $bucket, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - anywhereCache: projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache} + * - bucket: projects/{project}/buckets/{bucket} + * - folder: projects/{project}/buckets/{bucket}/folders/{folder=**} + * - folderLocationIntelligenceConfig: folders/{folder}/locations/{location}/intelligenceConfig + * - intelligenceConfig: folders/{folder}/locations/{location}/intelligenceConfig + * - managedFolder: projects/{project}/buckets/{bucket}/managedFolders/{managed_folder=**} + * - orgLocationIntelligenceConfig: organizations/{org}/locations/{location}/intelligenceConfig + * - projectLocationIntelligenceConfig: projects/{project}/locations/{location}/intelligenceConfig + * - storageLayout: projects/{project}/buckets/{bucket}/storageLayout + * + * 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|ClientOptions $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 'storage.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Storage\Control\V2\StorageControlClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new StorageControlClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $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 an Anywhere Cache instance. + * + * The async variant is {@see StorageControlClient::createAnywhereCacheAsync()} . + * + * @example samples/V2/StorageControlClient/create_anywhere_cache.php + * + * @param CreateAnywhereCacheRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createAnywhereCache(CreateAnywhereCacheRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateAnywhereCache', $request, $callOptions)->wait(); + } + + /** + * Creates a new folder. This operation is only applicable to a hierarchical + * namespace enabled bucket. + * + * The async variant is {@see StorageControlClient::createFolderAsync()} . + * + * @example samples/V2/StorageControlClient/create_folder.php + * + * @param CreateFolderRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Folder + * + * @throws ApiException Thrown if the API call fails. + */ + public function createFolder(CreateFolderRequest $request, array $callOptions = []): Folder + { + return $this->startApiCall('CreateFolder', $request, $callOptions)->wait(); + } + + /** + * Creates a new managed folder. + * + * The async variant is {@see StorageControlClient::createManagedFolderAsync()} . + * + * @example samples/V2/StorageControlClient/create_managed_folder.php + * + * @param CreateManagedFolderRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ManagedFolder + * + * @throws ApiException Thrown if the API call fails. + */ + public function createManagedFolder(CreateManagedFolderRequest $request, array $callOptions = []): ManagedFolder + { + return $this->startApiCall('CreateManagedFolder', $request, $callOptions)->wait(); + } + + /** + * Permanently deletes an empty folder. This operation is only applicable to a + * hierarchical namespace enabled bucket. + * + * The async variant is {@see StorageControlClient::deleteFolderAsync()} . + * + * @example samples/V2/StorageControlClient/delete_folder.php + * + * @param DeleteFolderRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteFolder(DeleteFolderRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteFolder', $request, $callOptions)->wait(); + } + + /** + * Deletes a folder recursively. This operation is only applicable to a + * hierarchical namespace enabled bucket. + * + * The async variant is {@see StorageControlClient::deleteFolderRecursiveAsync()} . + * + * @example samples/V2/StorageControlClient/delete_folder_recursive.php + * + * @param DeleteFolderRecursiveRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteFolderRecursive(DeleteFolderRecursiveRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteFolderRecursive', $request, $callOptions)->wait(); + } + + /** + * Permanently deletes an empty managed folder. + * + * The async variant is {@see StorageControlClient::deleteManagedFolderAsync()} . + * + * @example samples/V2/StorageControlClient/delete_managed_folder.php + * + * @param DeleteManagedFolderRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteManagedFolder(DeleteManagedFolderRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteManagedFolder', $request, $callOptions)->wait(); + } + + /** + * Disables an Anywhere Cache instance. A disabled instance is read-only. The + * disablement could be revoked by calling ResumeAnywhereCache. The cache + * instance will be deleted automatically if it remains in the disabled state + * for at least one hour. + * + * The async variant is {@see StorageControlClient::disableAnywhereCacheAsync()} . + * + * @example samples/V2/StorageControlClient/disable_anywhere_cache.php + * + * @param DisableAnywhereCacheRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AnywhereCache + * + * @throws ApiException Thrown if the API call fails. + */ + public function disableAnywhereCache(DisableAnywhereCacheRequest $request, array $callOptions = []): AnywhereCache + { + return $this->startApiCall('DisableAnywhereCache', $request, $callOptions)->wait(); + } + + /** + * Gets an Anywhere Cache instance. + * + * The async variant is {@see StorageControlClient::getAnywhereCacheAsync()} . + * + * @example samples/V2/StorageControlClient/get_anywhere_cache.php + * + * @param GetAnywhereCacheRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AnywhereCache + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAnywhereCache(GetAnywhereCacheRequest $request, array $callOptions = []): AnywhereCache + { + return $this->startApiCall('GetAnywhereCache', $request, $callOptions)->wait(); + } + + /** + * Returns metadata for the specified folder. This operation is only + * applicable to a hierarchical namespace enabled bucket. + * + * The async variant is {@see StorageControlClient::getFolderAsync()} . + * + * @example samples/V2/StorageControlClient/get_folder.php + * + * @param GetFolderRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Folder + * + * @throws ApiException Thrown if the API call fails. + */ + public function getFolder(GetFolderRequest $request, array $callOptions = []): Folder + { + return $this->startApiCall('GetFolder', $request, $callOptions)->wait(); + } + + /** + * Returns the Folder scoped singleton IntelligenceConfig resource. + * + * The async variant is + * {@see StorageControlClient::getFolderIntelligenceConfigAsync()} . + * + * @example samples/V2/StorageControlClient/get_folder_intelligence_config.php + * + * @param GetFolderIntelligenceConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return IntelligenceConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function getFolderIntelligenceConfig(GetFolderIntelligenceConfigRequest $request, array $callOptions = []): IntelligenceConfig + { + return $this->startApiCall('GetFolderIntelligenceConfig', $request, $callOptions)->wait(); + } + + /** + * Gets the IAM policy for a specified bucket. + * The `resource` field in the request should be + * `projects/_/buckets/{bucket}` for a bucket, or + * `projects/_/buckets/{bucket}/managedFolders/{managedFolder}` + * for a managed folder. + * + * The async variant is {@see StorageControlClient::getIamPolicyAsync()} . + * + * @example samples/V2/StorageControlClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Returns metadata for the specified managed folder. + * + * The async variant is {@see StorageControlClient::getManagedFolderAsync()} . + * + * @example samples/V2/StorageControlClient/get_managed_folder.php + * + * @param GetManagedFolderRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ManagedFolder + * + * @throws ApiException Thrown if the API call fails. + */ + public function getManagedFolder(GetManagedFolderRequest $request, array $callOptions = []): ManagedFolder + { + return $this->startApiCall('GetManagedFolder', $request, $callOptions)->wait(); + } + + /** + * Returns the Organization scoped singleton IntelligenceConfig resource. + * + * The async variant is + * {@see StorageControlClient::getOrganizationIntelligenceConfigAsync()} . + * + * @example samples/V2/StorageControlClient/get_organization_intelligence_config.php + * + * @param GetOrganizationIntelligenceConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return IntelligenceConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function getOrganizationIntelligenceConfig(GetOrganizationIntelligenceConfigRequest $request, array $callOptions = []): IntelligenceConfig + { + return $this->startApiCall('GetOrganizationIntelligenceConfig', $request, $callOptions)->wait(); + } + + /** + * Returns the Project scoped singleton IntelligenceConfig resource. + * + * The async variant is + * {@see StorageControlClient::getProjectIntelligenceConfigAsync()} . + * + * @example samples/V2/StorageControlClient/get_project_intelligence_config.php + * + * @param GetProjectIntelligenceConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return IntelligenceConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function getProjectIntelligenceConfig(GetProjectIntelligenceConfigRequest $request, array $callOptions = []): IntelligenceConfig + { + return $this->startApiCall('GetProjectIntelligenceConfig', $request, $callOptions)->wait(); + } + + /** + * Returns the storage layout configuration for a given bucket. + * + * The async variant is {@see StorageControlClient::getStorageLayoutAsync()} . + * + * @example samples/V2/StorageControlClient/get_storage_layout.php + * + * @param GetStorageLayoutRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return StorageLayout + * + * @throws ApiException Thrown if the API call fails. + */ + public function getStorageLayout(GetStorageLayoutRequest $request, array $callOptions = []): StorageLayout + { + return $this->startApiCall('GetStorageLayout', $request, $callOptions)->wait(); + } + + /** + * Lists Anywhere Cache instances for a given bucket. + * + * The async variant is {@see StorageControlClient::listAnywhereCachesAsync()} . + * + * @example samples/V2/StorageControlClient/list_anywhere_caches.php + * + * @param ListAnywhereCachesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listAnywhereCaches(ListAnywhereCachesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAnywhereCaches', $request, $callOptions); + } + + /** + * Retrieves a list of folders. This operation is only applicable to a + * hierarchical namespace enabled bucket. + * + * The async variant is {@see StorageControlClient::listFoldersAsync()} . + * + * @example samples/V2/StorageControlClient/list_folders.php + * + * @param ListFoldersRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listFolders(ListFoldersRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListFolders', $request, $callOptions); + } + + /** + * Retrieves a list of managed folders for a given bucket. + * + * The async variant is {@see StorageControlClient::listManagedFoldersAsync()} . + * + * @example samples/V2/StorageControlClient/list_managed_folders.php + * + * @param ListManagedFoldersRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listManagedFolders(ListManagedFoldersRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListManagedFolders', $request, $callOptions); + } + + /** + * Pauses an Anywhere Cache instance. + * + * The async variant is {@see StorageControlClient::pauseAnywhereCacheAsync()} . + * + * @example samples/V2/StorageControlClient/pause_anywhere_cache.php + * + * @param PauseAnywhereCacheRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AnywhereCache + * + * @throws ApiException Thrown if the API call fails. + */ + public function pauseAnywhereCache(PauseAnywhereCacheRequest $request, array $callOptions = []): AnywhereCache + { + return $this->startApiCall('PauseAnywhereCache', $request, $callOptions)->wait(); + } + + /** + * Renames a source folder to a destination folder. This operation is only + * applicable to a hierarchical namespace enabled bucket. During a rename, the + * source and destination folders are locked until the long running operation + * completes. + * + * The async variant is {@see StorageControlClient::renameFolderAsync()} . + * + * @example samples/V2/StorageControlClient/rename_folder.php + * + * @param RenameFolderRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function renameFolder(RenameFolderRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RenameFolder', $request, $callOptions)->wait(); + } + + /** + * Resumes a disabled or paused Anywhere Cache instance. + * + * The async variant is {@see StorageControlClient::resumeAnywhereCacheAsync()} . + * + * @example samples/V2/StorageControlClient/resume_anywhere_cache.php + * + * @param ResumeAnywhereCacheRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AnywhereCache + * + * @throws ApiException Thrown if the API call fails. + */ + public function resumeAnywhereCache(ResumeAnywhereCacheRequest $request, array $callOptions = []): AnywhereCache + { + return $this->startApiCall('ResumeAnywhereCache', $request, $callOptions)->wait(); + } + + /** + * Updates an IAM policy for the specified bucket. + * The `resource` field in the request should be + * `projects/_/buckets/{bucket}` for a bucket, or + * `projects/_/buckets/{bucket}/managedFolders/{managedFolder}` + * for a managed folder. + * + * The async variant is {@see StorageControlClient::setIamPolicyAsync()} . + * + * @example samples/V2/StorageControlClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Tests a set of permissions on the given bucket, object, or managed folder + * to see which, if any, are held by the caller. + * The `resource` field in the request should be + * `projects/_/buckets/{bucket}` for a bucket, + * `projects/_/buckets/{bucket}/objects/{object}` for an object, or + * `projects/_/buckets/{bucket}/managedFolders/{managedFolder}` + * for a managed folder. + * + * The async variant is {@see StorageControlClient::testIamPermissionsAsync()} . + * + * @example samples/V2/StorageControlClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } + + /** + * Updates an Anywhere Cache instance. Mutable fields include `ttl` and + * `admission_policy`. + * + * The async variant is {@see StorageControlClient::updateAnywhereCacheAsync()} . + * + * @example samples/V2/StorageControlClient/update_anywhere_cache.php + * + * @param UpdateAnywhereCacheRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateAnywhereCache(UpdateAnywhereCacheRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateAnywhereCache', $request, $callOptions)->wait(); + } + + /** + * Updates the Folder scoped singleton IntelligenceConfig resource. + * + * The async variant is + * {@see StorageControlClient::updateFolderIntelligenceConfigAsync()} . + * + * @example samples/V2/StorageControlClient/update_folder_intelligence_config.php + * + * @param UpdateFolderIntelligenceConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return IntelligenceConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateFolderIntelligenceConfig(UpdateFolderIntelligenceConfigRequest $request, array $callOptions = []): IntelligenceConfig + { + return $this->startApiCall('UpdateFolderIntelligenceConfig', $request, $callOptions)->wait(); + } + + /** + * Updates the Organization scoped singleton IntelligenceConfig resource. + * + * The async variant is + * {@see StorageControlClient::updateOrganizationIntelligenceConfigAsync()} . + * + * @example samples/V2/StorageControlClient/update_organization_intelligence_config.php + * + * @param UpdateOrganizationIntelligenceConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return IntelligenceConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateOrganizationIntelligenceConfig(UpdateOrganizationIntelligenceConfigRequest $request, array $callOptions = []): IntelligenceConfig + { + return $this->startApiCall('UpdateOrganizationIntelligenceConfig', $request, $callOptions)->wait(); + } + + /** + * Updates the Project scoped singleton IntelligenceConfig resource. + * + * The async variant is + * {@see StorageControlClient::updateProjectIntelligenceConfigAsync()} . + * + * @example samples/V2/StorageControlClient/update_project_intelligence_config.php + * + * @param UpdateProjectIntelligenceConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return IntelligenceConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateProjectIntelligenceConfig(UpdateProjectIntelligenceConfigRequest $request, array $callOptions = []): IntelligenceConfig + { + return $this->startApiCall('UpdateProjectIntelligenceConfig', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/StorageControl/v2/src/V2/gapic_metadata.json b/owl-bot-staging/StorageControl/v2/src/V2/gapic_metadata.json new file mode 100644 index 000000000000..86b444f90e16 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/src/V2/gapic_metadata.json @@ -0,0 +1,153 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.storage.control.v2", + "libraryPackage": "Google\\Cloud\\Storage\\Control\\V2", + "services": { + "StorageControl": { + "clients": { + "grpc": { + "libraryClient": "StorageControlGapicClient", + "rpcs": { + "CreateAnywhereCache": { + "methods": [ + "createAnywhereCache" + ] + }, + "CreateFolder": { + "methods": [ + "createFolder" + ] + }, + "CreateManagedFolder": { + "methods": [ + "createManagedFolder" + ] + }, + "DeleteFolder": { + "methods": [ + "deleteFolder" + ] + }, + "DeleteFolderRecursive": { + "methods": [ + "deleteFolderRecursive" + ] + }, + "DeleteManagedFolder": { + "methods": [ + "deleteManagedFolder" + ] + }, + "DisableAnywhereCache": { + "methods": [ + "disableAnywhereCache" + ] + }, + "GetAnywhereCache": { + "methods": [ + "getAnywhereCache" + ] + }, + "GetFolder": { + "methods": [ + "getFolder" + ] + }, + "GetFolderIntelligenceConfig": { + "methods": [ + "getFolderIntelligenceConfig" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "GetManagedFolder": { + "methods": [ + "getManagedFolder" + ] + }, + "GetOrganizationIntelligenceConfig": { + "methods": [ + "getOrganizationIntelligenceConfig" + ] + }, + "GetProjectIntelligenceConfig": { + "methods": [ + "getProjectIntelligenceConfig" + ] + }, + "GetStorageLayout": { + "methods": [ + "getStorageLayout" + ] + }, + "ListAnywhereCaches": { + "methods": [ + "listAnywhereCaches" + ] + }, + "ListFolders": { + "methods": [ + "listFolders" + ] + }, + "ListManagedFolders": { + "methods": [ + "listManagedFolders" + ] + }, + "PauseAnywhereCache": { + "methods": [ + "pauseAnywhereCache" + ] + }, + "RenameFolder": { + "methods": [ + "renameFolder" + ] + }, + "ResumeAnywhereCache": { + "methods": [ + "resumeAnywhereCache" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "UpdateAnywhereCache": { + "methods": [ + "updateAnywhereCache" + ] + }, + "UpdateFolderIntelligenceConfig": { + "methods": [ + "updateFolderIntelligenceConfig" + ] + }, + "UpdateOrganizationIntelligenceConfig": { + "methods": [ + "updateOrganizationIntelligenceConfig" + ] + }, + "UpdateProjectIntelligenceConfig": { + "methods": [ + "updateProjectIntelligenceConfig" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_client_config.json b/owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_client_config.json new file mode 100644 index 000000000000..93b69f4f75bf --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_client_config.json @@ -0,0 +1,183 @@ +{ + "interfaces": { + "google.storage.control.v2.StorageControl": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "RESOURCE_EXHAUSTED", + "UNAVAILABLE", + "DEADLINE_EXCEEDED", + "INTERNAL", + "UNKNOWN" + ], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 2.0, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateAnywhereCache": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateFolder": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateManagedFolder": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteFolder": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteFolderRecursive": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteManagedFolder": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DisableAnywhereCache": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetAnywhereCache": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetFolder": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetFolderIntelligenceConfig": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetManagedFolder": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetOrganizationIntelligenceConfig": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetProjectIntelligenceConfig": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetStorageLayout": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListAnywhereCaches": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListFolders": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListManagedFolders": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "PauseAnywhereCache": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "RenameFolder": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ResumeAnywhereCache": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateAnywhereCache": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateFolderIntelligenceConfig": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateOrganizationIntelligenceConfig": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateProjectIntelligenceConfig": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_descriptor_config.php b/owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_descriptor_config.php new file mode 100644 index 000000000000..33d26bc94c31 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_descriptor_config.php @@ -0,0 +1,516 @@ + [ + 'google.storage.control.v2.StorageControl' => [ + 'CreateAnywhereCache' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Storage\Control\V2\AnywhereCache', + 'metadataReturnType' => '\Google\Cloud\Storage\Control\V2\CreateAnywhereCacheMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + 'autoPopulatedFields' => [ + 'requestId' => \Google\Api\FieldInfo\Format::UUID4, + ], + ], + 'DeleteFolderRecursive' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Storage\Control\V2\DeleteFolderRecursiveMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', + ], + ], + ], + 'autoPopulatedFields' => [ + 'requestId' => \Google\Api\FieldInfo\Format::UUID4, + ], + ], + 'RenameFolder' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Storage\Control\V2\Folder', + 'metadataReturnType' => '\Google\Cloud\Storage\Control\V2\RenameFolderMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', + ], + ], + ], + 'autoPopulatedFields' => [ + 'requestId' => \Google\Api\FieldInfo\Format::UUID4, + ], + ], + 'UpdateAnywhereCache' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Storage\Control\V2\AnywhereCache', + 'metadataReturnType' => '\Google\Cloud\Storage\Control\V2\UpdateAnywhereCacheMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getAnywhereCache', + 'getName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', + ], + ], + ], + 'autoPopulatedFields' => [ + 'requestId' => \Google\Api\FieldInfo\Format::UUID4, + ], + ], + 'CreateFolder' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Storage\Control\V2\Folder', + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + 'autoPopulatedFields' => [ + 'requestId' => \Google\Api\FieldInfo\Format::UUID4, + ], + ], + 'CreateManagedFolder' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Storage\Control\V2\ManagedFolder', + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + 'autoPopulatedFields' => [ + 'requestId' => \Google\Api\FieldInfo\Format::UUID4, + ], + ], + 'DeleteFolder' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', + ], + ], + ], + 'autoPopulatedFields' => [ + 'requestId' => \Google\Api\FieldInfo\Format::UUID4, + ], + ], + 'DeleteManagedFolder' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', + ], + ], + ], + 'autoPopulatedFields' => [ + 'requestId' => \Google\Api\FieldInfo\Format::UUID4, + ], + ], + 'DisableAnywhereCache' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Storage\Control\V2\AnywhereCache', + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', + ], + ], + ], + 'autoPopulatedFields' => [ + 'requestId' => \Google\Api\FieldInfo\Format::UUID4, + ], + ], + 'GetAnywhereCache' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Storage\Control\V2\AnywhereCache', + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', + ], + ], + ], + 'autoPopulatedFields' => [ + 'requestId' => \Google\Api\FieldInfo\Format::UUID4, + ], + ], + 'GetFolder' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Storage\Control\V2\Folder', + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', + ], + ], + ], + 'autoPopulatedFields' => [ + 'requestId' => \Google\Api\FieldInfo\Format::UUID4, + ], + ], + 'GetFolderIntelligenceConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Storage\Control\V2\IntelligenceConfig', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getResource', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', + ], + ], + ], + ], + 'GetManagedFolder' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Storage\Control\V2\ManagedFolder', + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', + ], + ], + ], + 'autoPopulatedFields' => [ + 'requestId' => \Google\Api\FieldInfo\Format::UUID4, + ], + ], + 'GetOrganizationIntelligenceConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Storage\Control\V2\IntelligenceConfig', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetProjectIntelligenceConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Storage\Control\V2\IntelligenceConfig', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetStorageLayout' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Storage\Control\V2\StorageLayout', + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', + ], + ], + ], + 'autoPopulatedFields' => [ + 'requestId' => \Google\Api\FieldInfo\Format::UUID4, + ], + ], + 'ListAnywhereCaches' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAnywhereCaches', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Storage\Control\V2\ListAnywhereCachesResponse', + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + 'autoPopulatedFields' => [ + 'requestId' => \Google\Api\FieldInfo\Format::UUID4, + ], + ], + 'ListFolders' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getFolders', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Storage\Control\V2\ListFoldersResponse', + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListManagedFolders' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getManagedFolders', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Storage\Control\V2\ListManagedFoldersResponse', + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + 'autoPopulatedFields' => [ + 'requestId' => \Google\Api\FieldInfo\Format::UUID4, + ], + ], + 'PauseAnywhereCache' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Storage\Control\V2\AnywhereCache', + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', + ], + ], + ], + 'autoPopulatedFields' => [ + 'requestId' => \Google\Api\FieldInfo\Format::UUID4, + ], + ], + 'ResumeAnywhereCache' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Storage\Control\V2\AnywhereCache', + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', + ], + ], + ], + 'autoPopulatedFields' => [ + 'requestId' => \Google\Api\FieldInfo\Format::UUID4, + ], + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getResource', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getResource', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/buckets\/[^\/]+)\/objects(?:\/.*)?$/', + '/^(?projects\/[^\/]+\/buckets\/[^\/]+)\/managedFolders(?:\/.*)?$/', + ], + ], + ], + ], + 'UpdateFolderIntelligenceConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Storage\Control\V2\IntelligenceConfig', + 'headerParams' => [ + [ + 'keyName' => 'intelligence_config.name', + 'fieldAccessors' => [ + 'getIntelligenceConfig', + 'getName', + ], + ], + ], + ], + 'UpdateOrganizationIntelligenceConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Storage\Control\V2\IntelligenceConfig', + 'headerParams' => [ + [ + 'keyName' => 'intelligence_config.name', + 'fieldAccessors' => [ + 'getIntelligenceConfig', + 'getName', + ], + ], + ], + ], + 'UpdateProjectIntelligenceConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Storage\Control\V2\IntelligenceConfig', + 'headerParams' => [ + [ + 'keyName' => 'intelligence_config.name', + 'fieldAccessors' => [ + 'getIntelligenceConfig', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'anywhereCache' => 'projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}', + 'bucket' => 'projects/{project}/buckets/{bucket}', + 'folder' => 'projects/{project}/buckets/{bucket}/folders/{folder=**}', + 'folderLocationIntelligenceConfig' => 'folders/{folder}/locations/{location}/intelligenceConfig', + 'intelligenceConfig' => 'folders/{folder}/locations/{location}/intelligenceConfig', + 'managedFolder' => 'projects/{project}/buckets/{bucket}/managedFolders/{managed_folder=**}', + 'orgLocationIntelligenceConfig' => 'organizations/{org}/locations/{location}/intelligenceConfig', + 'projectLocationIntelligenceConfig' => 'projects/{project}/locations/{location}/intelligenceConfig', + 'storageLayout' => 'projects/{project}/buckets/{bucket}/storageLayout', + ], + ], + ], +]; diff --git a/owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_rest_client_config.php b/owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_rest_client_config.php new file mode 100644 index 000000000000..f77f4c34fc52 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_rest_client_config.php @@ -0,0 +1,109 @@ + [ + 'google.storage.control.v2.StorageControl' => [ + 'GetFolderIntelligenceConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=folders/*/locations/*/intelligenceConfig}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOrganizationIntelligenceConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=organizations/*/locations/*/intelligenceConfig}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetProjectIntelligenceConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/intelligenceConfig}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateFolderIntelligenceConfig' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{intelligence_config.name=folders/*/locations/*/intelligenceConfig}', + 'body' => 'intelligence_config', + 'placeholders' => [ + 'intelligence_config.name' => [ + 'getters' => [ + 'getIntelligenceConfig', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateOrganizationIntelligenceConfig' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{intelligence_config.name=organizations/*/locations/*/intelligenceConfig}', + 'body' => 'intelligence_config', + 'placeholders' => [ + 'intelligence_config.name' => [ + 'getters' => [ + 'getIntelligenceConfig', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateProjectIntelligenceConfig' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{intelligence_config.name=projects/*/locations/*/intelligenceConfig}', + 'body' => 'intelligence_config', + 'placeholders' => [ + 'intelligence_config.name' => [ + 'getters' => [ + 'getIntelligenceConfig', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/StorageControl/v2/tests/Unit/V2/Client/StorageControlClientTest.php b/owl-bot-staging/StorageControl/v2/tests/Unit/V2/Client/StorageControlClientTest.php new file mode 100644 index 000000000000..882f048c53e5 --- /dev/null +++ b/owl-bot-staging/StorageControl/v2/tests/Unit/V2/Client/StorageControlClientTest.php @@ -0,0 +1,2297 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return StorageControlClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new StorageControlClient($options); + } + + /** @test */ + public function createAnywhereCacheTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAnywhereCacheTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $zone = 'zone3744684'; + $admissionPolicy = 'admissionPolicy1847270952'; + $state = 'state109757585'; + $pendingUpdate = false; + $expectedResponse = new AnywhereCache(); + $expectedResponse->setName($name); + $expectedResponse->setZone($zone); + $expectedResponse->setAdmissionPolicy($admissionPolicy); + $expectedResponse->setState($state); + $expectedResponse->setPendingUpdate($pendingUpdate); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAnywhereCacheTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); + $anywhereCache = new AnywhereCache(); + $request = (new CreateAnywhereCacheRequest()) + ->setParent($formattedParent) + ->setAnywhereCache($anywhereCache); + $response = $gapicClient->createAnywhereCache($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/CreateAnywhereCache', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAnywhereCache(); + $this->assertProtobufEquals($anywhereCache, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAnywhereCacheTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createAnywhereCacheExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAnywhereCacheTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->bucketName('[PROJECT]', '[BUCKET]'); + $anywhereCache = new AnywhereCache(); + $request = (new CreateAnywhereCacheRequest()) + ->setParent($formattedParent) + ->setAnywhereCache($anywhereCache); + $response = $gapicClient->createAnywhereCache($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAnywhereCacheTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createFolderTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $metageneration = 1048558813; + $expectedResponse = new Folder(); + $expectedResponse->setName($name); + $expectedResponse->setMetageneration($metageneration); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); + $folder = new Folder(); + $folderId = 'folderId527488652'; + $request = (new CreateFolderRequest()) + ->setParent($formattedParent) + ->setFolder($folder) + ->setFolderId($folderId); + $response = $gapicClient->createFolder($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/CreateFolder', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getFolder(); + $this->assertProtobufEquals($folder, $actualValue); + $actualValue = $actualRequestObject->getFolderId(); + $this->assertProtobufEquals($folderId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createFolderExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); + $folder = new Folder(); + $folderId = 'folderId527488652'; + $request = (new CreateFolderRequest()) + ->setParent($formattedParent) + ->setFolder($folder) + ->setFolderId($folderId); + try { + $gapicClient->createFolder($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createManagedFolderTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $metageneration = 1048558813; + $expectedResponse = new ManagedFolder(); + $expectedResponse->setName($name); + $expectedResponse->setMetageneration($metageneration); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); + $managedFolder = new ManagedFolder(); + $managedFolderId = 'managedFolderId-239131156'; + $request = (new CreateManagedFolderRequest()) + ->setParent($formattedParent) + ->setManagedFolder($managedFolder) + ->setManagedFolderId($managedFolderId); + $response = $gapicClient->createManagedFolder($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/CreateManagedFolder', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getManagedFolder(); + $this->assertProtobufEquals($managedFolder, $actualValue); + $actualValue = $actualRequestObject->getManagedFolderId(); + $this->assertProtobufEquals($managedFolderId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createManagedFolderExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); + $managedFolder = new ManagedFolder(); + $managedFolderId = 'managedFolderId-239131156'; + $request = (new CreateManagedFolderRequest()) + ->setParent($formattedParent) + ->setManagedFolder($managedFolder) + ->setManagedFolderId($managedFolderId); + try { + $gapicClient->createManagedFolder($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteFolderTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); + $request = (new DeleteFolderRequest()) + ->setName($formattedName); + $gapicClient->deleteFolder($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/DeleteFolder', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteFolderExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); + $request = (new DeleteFolderRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteFolder($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteFolderRecursiveTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteFolderRecursiveTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteFolderRecursiveTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); + $request = (new DeleteFolderRecursiveRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteFolderRecursive($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/DeleteFolderRecursive', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteFolderRecursiveTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteFolderRecursiveExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteFolderRecursiveTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); + $request = (new DeleteFolderRecursiveRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteFolderRecursive($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteFolderRecursiveTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteManagedFolderTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->managedFolderName('[PROJECT]', '[BUCKET]', '[MANAGED_FOLDER]'); + $request = (new DeleteManagedFolderRequest()) + ->setName($formattedName); + $gapicClient->deleteManagedFolder($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/DeleteManagedFolder', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteManagedFolderExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->managedFolderName('[PROJECT]', '[BUCKET]', '[MANAGED_FOLDER]'); + $request = (new DeleteManagedFolderRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteManagedFolder($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function disableAnywhereCacheTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $zone = 'zone3744684'; + $admissionPolicy = 'admissionPolicy1847270952'; + $state = 'state109757585'; + $pendingUpdate = false; + $expectedResponse = new AnywhereCache(); + $expectedResponse->setName($name2); + $expectedResponse->setZone($zone); + $expectedResponse->setAdmissionPolicy($admissionPolicy); + $expectedResponse->setState($state); + $expectedResponse->setPendingUpdate($pendingUpdate); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->anywhereCacheName('[PROJECT]', '[BUCKET]', '[ANYWHERE_CACHE]'); + $request = (new DisableAnywhereCacheRequest()) + ->setName($formattedName); + $response = $gapicClient->disableAnywhereCache($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/DisableAnywhereCache', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function disableAnywhereCacheExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->anywhereCacheName('[PROJECT]', '[BUCKET]', '[ANYWHERE_CACHE]'); + $request = (new DisableAnywhereCacheRequest()) + ->setName($formattedName); + try { + $gapicClient->disableAnywhereCache($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAnywhereCacheTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $zone = 'zone3744684'; + $admissionPolicy = 'admissionPolicy1847270952'; + $state = 'state109757585'; + $pendingUpdate = false; + $expectedResponse = new AnywhereCache(); + $expectedResponse->setName($name2); + $expectedResponse->setZone($zone); + $expectedResponse->setAdmissionPolicy($admissionPolicy); + $expectedResponse->setState($state); + $expectedResponse->setPendingUpdate($pendingUpdate); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->anywhereCacheName('[PROJECT]', '[BUCKET]', '[ANYWHERE_CACHE]'); + $request = (new GetAnywhereCacheRequest()) + ->setName($formattedName); + $response = $gapicClient->getAnywhereCache($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/GetAnywhereCache', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAnywhereCacheExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->anywhereCacheName('[PROJECT]', '[BUCKET]', '[ANYWHERE_CACHE]'); + $request = (new GetAnywhereCacheRequest()) + ->setName($formattedName); + try { + $gapicClient->getAnywhereCache($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getFolderTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $metageneration = 1048558813; + $expectedResponse = new Folder(); + $expectedResponse->setName($name2); + $expectedResponse->setMetageneration($metageneration); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); + $request = (new GetFolderRequest()) + ->setName($formattedName); + $response = $gapicClient->getFolder($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/GetFolder', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getFolderExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); + $request = (new GetFolderRequest()) + ->setName($formattedName); + try { + $gapicClient->getFolder($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getFolderIntelligenceConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new IntelligenceConfig(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->intelligenceConfigName('[FOLDER]', '[LOCATION]'); + $request = (new GetFolderIntelligenceConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->getFolderIntelligenceConfig($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/GetFolderIntelligenceConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getFolderIntelligenceConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->intelligenceConfigName('[FOLDER]', '[LOCATION]'); + $request = (new GetFolderIntelligenceConfigRequest()) + ->setName($formattedName); + try { + $gapicClient->getFolderIntelligenceConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getManagedFolderTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $metageneration = 1048558813; + $expectedResponse = new ManagedFolder(); + $expectedResponse->setName($name2); + $expectedResponse->setMetageneration($metageneration); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->managedFolderName('[PROJECT]', '[BUCKET]', '[MANAGED_FOLDER]'); + $request = (new GetManagedFolderRequest()) + ->setName($formattedName); + $response = $gapicClient->getManagedFolder($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/GetManagedFolder', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getManagedFolderExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->managedFolderName('[PROJECT]', '[BUCKET]', '[MANAGED_FOLDER]'); + $request = (new GetManagedFolderRequest()) + ->setName($formattedName); + try { + $gapicClient->getManagedFolder($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getOrganizationIntelligenceConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new IntelligenceConfig(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->intelligenceConfigName('[FOLDER]', '[LOCATION]'); + $request = (new GetOrganizationIntelligenceConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->getOrganizationIntelligenceConfig($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/GetOrganizationIntelligenceConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getOrganizationIntelligenceConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->intelligenceConfigName('[FOLDER]', '[LOCATION]'); + $request = (new GetOrganizationIntelligenceConfigRequest()) + ->setName($formattedName); + try { + $gapicClient->getOrganizationIntelligenceConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getProjectIntelligenceConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new IntelligenceConfig(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->intelligenceConfigName('[FOLDER]', '[LOCATION]'); + $request = (new GetProjectIntelligenceConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->getProjectIntelligenceConfig($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/GetProjectIntelligenceConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getProjectIntelligenceConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->intelligenceConfigName('[FOLDER]', '[LOCATION]'); + $request = (new GetProjectIntelligenceConfigRequest()) + ->setName($formattedName); + try { + $gapicClient->getProjectIntelligenceConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getStorageLayoutTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $location = 'location1901043637'; + $locationType = 'locationType-1796591228'; + $expectedResponse = new StorageLayout(); + $expectedResponse->setName($name2); + $expectedResponse->setLocation($location); + $expectedResponse->setLocationType($locationType); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->storageLayoutName('[PROJECT]', '[BUCKET]'); + $request = (new GetStorageLayoutRequest()) + ->setName($formattedName); + $response = $gapicClient->getStorageLayout($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/GetStorageLayout', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getStorageLayoutExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->storageLayoutName('[PROJECT]', '[BUCKET]'); + $request = (new GetStorageLayoutRequest()) + ->setName($formattedName); + try { + $gapicClient->getStorageLayout($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAnywhereCachesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $anywhereCachesElement = new AnywhereCache(); + $anywhereCaches = [ + $anywhereCachesElement, + ]; + $expectedResponse = new ListAnywhereCachesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAnywhereCaches($anywhereCaches); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); + $request = (new ListAnywhereCachesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAnywhereCaches($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAnywhereCaches()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/ListAnywhereCaches', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAnywhereCachesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); + $request = (new ListAnywhereCachesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAnywhereCaches($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listFoldersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $foldersElement = new Folder(); + $folders = [ + $foldersElement, + ]; + $expectedResponse = new ListFoldersResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setFolders($folders); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); + $request = (new ListFoldersRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listFolders($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getFolders()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/ListFolders', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listFoldersExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); + $request = (new ListFoldersRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listFolders($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listManagedFoldersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $managedFoldersElement = new ManagedFolder(); + $managedFolders = [ + $managedFoldersElement, + ]; + $expectedResponse = new ListManagedFoldersResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setManagedFolders($managedFolders); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); + $request = (new ListManagedFoldersRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listManagedFolders($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getManagedFolders()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/ListManagedFolders', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listManagedFoldersExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); + $request = (new ListManagedFoldersRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listManagedFolders($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function pauseAnywhereCacheTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $zone = 'zone3744684'; + $admissionPolicy = 'admissionPolicy1847270952'; + $state = 'state109757585'; + $pendingUpdate = false; + $expectedResponse = new AnywhereCache(); + $expectedResponse->setName($name2); + $expectedResponse->setZone($zone); + $expectedResponse->setAdmissionPolicy($admissionPolicy); + $expectedResponse->setState($state); + $expectedResponse->setPendingUpdate($pendingUpdate); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->anywhereCacheName('[PROJECT]', '[BUCKET]', '[ANYWHERE_CACHE]'); + $request = (new PauseAnywhereCacheRequest()) + ->setName($formattedName); + $response = $gapicClient->pauseAnywhereCache($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/PauseAnywhereCache', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function pauseAnywhereCacheExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->anywhereCacheName('[PROJECT]', '[BUCKET]', '[ANYWHERE_CACHE]'); + $request = (new PauseAnywhereCacheRequest()) + ->setName($formattedName); + try { + $gapicClient->pauseAnywhereCache($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function renameFolderTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/renameFolderTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $metageneration = 1048558813; + $expectedResponse = new Folder(); + $expectedResponse->setName($name2); + $expectedResponse->setMetageneration($metageneration); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/renameFolderTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); + $destinationFolderId = 'destinationFolderId368368539'; + $request = (new RenameFolderRequest()) + ->setName($formattedName) + ->setDestinationFolderId($destinationFolderId); + $response = $gapicClient->renameFolder($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/RenameFolder', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getDestinationFolderId(); + $this->assertProtobufEquals($destinationFolderId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/renameFolderTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function renameFolderExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/renameFolderTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); + $destinationFolderId = 'destinationFolderId368368539'; + $request = (new RenameFolderRequest()) + ->setName($formattedName) + ->setDestinationFolderId($destinationFolderId); + $response = $gapicClient->renameFolder($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/renameFolderTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function resumeAnywhereCacheTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $zone = 'zone3744684'; + $admissionPolicy = 'admissionPolicy1847270952'; + $state = 'state109757585'; + $pendingUpdate = false; + $expectedResponse = new AnywhereCache(); + $expectedResponse->setName($name2); + $expectedResponse->setZone($zone); + $expectedResponse->setAdmissionPolicy($admissionPolicy); + $expectedResponse->setState($state); + $expectedResponse->setPendingUpdate($pendingUpdate); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->anywhereCacheName('[PROJECT]', '[BUCKET]', '[ANYWHERE_CACHE]'); + $request = (new ResumeAnywhereCacheRequest()) + ->setName($formattedName); + $response = $gapicClient->resumeAnywhereCache($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/ResumeAnywhereCache', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resumeAnywhereCacheExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->anywhereCacheName('[PROJECT]', '[BUCKET]', '[ANYWHERE_CACHE]'); + $request = (new ResumeAnywhereCacheRequest()) + ->setName($formattedName); + try { + $gapicClient->resumeAnywhereCache($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateAnywhereCacheTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAnywhereCacheTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $zone = 'zone3744684'; + $admissionPolicy = 'admissionPolicy1847270952'; + $state = 'state109757585'; + $pendingUpdate = false; + $expectedResponse = new AnywhereCache(); + $expectedResponse->setName($name); + $expectedResponse->setZone($zone); + $expectedResponse->setAdmissionPolicy($admissionPolicy); + $expectedResponse->setState($state); + $expectedResponse->setPendingUpdate($pendingUpdate); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateAnywhereCacheTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $anywhereCache = new AnywhereCache(); + $updateMask = new FieldMask(); + $request = (new UpdateAnywhereCacheRequest()) + ->setAnywhereCache($anywhereCache) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateAnywhereCache($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/UpdateAnywhereCache', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getAnywhereCache(); + $this->assertProtobufEquals($anywhereCache, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAnywhereCacheTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateAnywhereCacheExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAnywhereCacheTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $anywhereCache = new AnywhereCache(); + $updateMask = new FieldMask(); + $request = (new UpdateAnywhereCacheRequest()) + ->setAnywhereCache($anywhereCache) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateAnywhereCache($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAnywhereCacheTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateFolderIntelligenceConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new IntelligenceConfig(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $intelligenceConfig = new IntelligenceConfig(); + $updateMask = new FieldMask(); + $request = (new UpdateFolderIntelligenceConfigRequest()) + ->setIntelligenceConfig($intelligenceConfig) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateFolderIntelligenceConfig($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/UpdateFolderIntelligenceConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getIntelligenceConfig(); + $this->assertProtobufEquals($intelligenceConfig, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateFolderIntelligenceConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $intelligenceConfig = new IntelligenceConfig(); + $updateMask = new FieldMask(); + $request = (new UpdateFolderIntelligenceConfigRequest()) + ->setIntelligenceConfig($intelligenceConfig) + ->setUpdateMask($updateMask); + try { + $gapicClient->updateFolderIntelligenceConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateOrganizationIntelligenceConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new IntelligenceConfig(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $intelligenceConfig = new IntelligenceConfig(); + $updateMask = new FieldMask(); + $request = (new UpdateOrganizationIntelligenceConfigRequest()) + ->setIntelligenceConfig($intelligenceConfig) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateOrganizationIntelligenceConfig($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/UpdateOrganizationIntelligenceConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getIntelligenceConfig(); + $this->assertProtobufEquals($intelligenceConfig, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateOrganizationIntelligenceConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $intelligenceConfig = new IntelligenceConfig(); + $updateMask = new FieldMask(); + $request = (new UpdateOrganizationIntelligenceConfigRequest()) + ->setIntelligenceConfig($intelligenceConfig) + ->setUpdateMask($updateMask); + try { + $gapicClient->updateOrganizationIntelligenceConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateProjectIntelligenceConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new IntelligenceConfig(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $intelligenceConfig = new IntelligenceConfig(); + $updateMask = new FieldMask(); + $request = (new UpdateProjectIntelligenceConfigRequest()) + ->setIntelligenceConfig($intelligenceConfig) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateProjectIntelligenceConfig($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/UpdateProjectIntelligenceConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getIntelligenceConfig(); + $this->assertProtobufEquals($intelligenceConfig, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateProjectIntelligenceConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $intelligenceConfig = new IntelligenceConfig(); + $updateMask = new FieldMask(); + $request = (new UpdateProjectIntelligenceConfigRequest()) + ->setIntelligenceConfig($intelligenceConfig) + ->setUpdateMask($updateMask); + try { + $gapicClient->updateProjectIntelligenceConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createAnywhereCacheAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAnywhereCacheTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $zone = 'zone3744684'; + $admissionPolicy = 'admissionPolicy1847270952'; + $state = 'state109757585'; + $pendingUpdate = false; + $expectedResponse = new AnywhereCache(); + $expectedResponse->setName($name); + $expectedResponse->setZone($zone); + $expectedResponse->setAdmissionPolicy($admissionPolicy); + $expectedResponse->setState($state); + $expectedResponse->setPendingUpdate($pendingUpdate); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAnywhereCacheTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); + $anywhereCache = new AnywhereCache(); + $request = (new CreateAnywhereCacheRequest()) + ->setParent($formattedParent) + ->setAnywhereCache($anywhereCache); + $response = $gapicClient->createAnywhereCacheAsync($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.storage.control.v2.StorageControl/CreateAnywhereCache', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAnywhereCache(); + $this->assertProtobufEquals($anywhereCache, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAnywhereCacheTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->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 783f25593677cc8e995678df4275a71f047037de Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 6 Feb 2026 19:12:25 +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 --- StorageControl/metadata/V2/StorageControl.php | Bin 16796 -> 17434 bytes .../delete_folder_recursive.php | 0 .../src/V2/Client/StorageControlClient.php | 31 + .../src}/V2/DeleteFolderRecursiveMetadata.php | 0 .../src}/V2/DeleteFolderRecursiveRequest.php | 0 StorageControl/src/V2/gapic_metadata.json | 5 + .../storage_control_client_config.json | 5 + .../storage_control_descriptor_config.php | 25 + .../V2/Client/StorageControlClientTest.php | 123 + .../Storage/Control/V2/StorageControl.php | Bin 17434 -> 0 bytes .../Storage/Control/V2/AnywhereCache.php | 383 --- .../V2/CommonLongRunningOperationMetadata.php | 273 -- .../V2/CreateAnywhereCacheMetadata.php | 274 -- .../Control/V2/CreateAnywhereCacheRequest.php | 189 -- .../Control/V2/CreateFolderRequest.php | 280 -- .../Control/V2/CreateManagedFolderRequest.php | 221 -- .../Control/V2/DeleteFolderRequest.php | 221 -- .../Control/V2/DeleteManagedFolderRequest.php | 271 -- .../V2/DisableAnywhereCacheRequest.php | 128 - .../Cloud/Storage/Control/V2/Folder.php | 258 -- .../Control/V2/GetAnywhereCacheRequest.php | 124 - .../V2/GetFolderIntelligenceConfigRequest.php | 97 - .../Storage/Control/V2/GetFolderRequest.php | 221 -- .../Control/V2/GetManagedFolderRequest.php | 225 -- ...tOrganizationIntelligenceConfigRequest.php | 97 - .../GetProjectIntelligenceConfigRequest.php | 97 - .../Control/V2/GetStorageLayoutRequest.php | 162 -- .../Storage/Control/V2/IntelligenceConfig.php | 314 --- .../V2/IntelligenceConfig/EditionConfig.php | 88 - .../EffectiveIntelligenceConfig.php | 116 - .../EffectiveEdition.php | 64 - .../Control/V2/IntelligenceConfig/Filter.php | 188 -- .../Filter/CloudStorageBuckets.php | 98 - .../Filter/CloudStorageLocations.php | 78 - .../V2/IntelligenceConfig/TrialConfig.php | 80 - .../Control/V2/ListAnywhereCachesRequest.php | 195 -- .../Control/V2/ListAnywhereCachesResponse.php | 105 - .../Storage/Control/V2/ListFoldersRequest.php | 373 --- .../Control/V2/ListFoldersResponse.php | 105 - .../Control/V2/ListManagedFoldersRequest.php | 233 -- .../Control/V2/ListManagedFoldersResponse.php | 105 - .../Storage/Control/V2/ManagedFolder.php | 205 -- .../Control/V2/PauseAnywhereCacheRequest.php | 128 - .../Storage/Control/V2/PendingRenameInfo.php | 67 - .../Control/V2/RenameFolderMetadata.php | 146 -- .../Control/V2/RenameFolderRequest.php | 261 -- .../Control/V2/ResumeAnywhereCacheRequest.php | 128 - .../Storage/Control/V2/StorageLayout.php | 239 -- .../StorageLayout/CustomPlacementConfig.php | 72 - .../StorageLayout/HierarchicalNamespace.php | 70 - .../V2/UpdateAnywhereCacheMetadata.php | 274 -- .../Control/V2/UpdateAnywhereCacheRequest.php | 210 -- .../UpdateFolderIntelligenceConfigRequest.php | 189 -- ...eOrganizationIntelligenceConfigRequest.php | 189 -- ...UpdateProjectIntelligenceConfigRequest.php | 189 -- .../create_anywhere_cache.php | 86 - .../V2/StorageControlClient/create_folder.php | 82 - .../create_managed_folder.php | 77 - .../V2/StorageControlClient/delete_folder.php | 71 - .../delete_managed_folder.php | 75 - .../disable_anywhere_cache.php | 79 - .../get_anywhere_cache.php | 76 - .../V2/StorageControlClient/get_folder.php | 73 - .../get_folder_intelligence_config.php | 74 - .../StorageControlClient/get_iam_policy.php | 75 - .../get_managed_folder.php | 77 - .../get_organization_intelligence_config.php | 74 - .../get_project_intelligence_config.php | 74 - .../get_storage_layout.php | 72 - .../list_anywhere_caches.php | 76 - .../V2/StorageControlClient/list_folders.php | 78 - .../list_managed_folders.php | 76 - .../pause_anywhere_cache.php | 76 - .../V2/StorageControlClient/rename_folder.php | 90 - .../resume_anywhere_cache.php | 76 - .../StorageControlClient/set_iam_policy.php | 77 - .../test_iam_permissions.php | 84 - .../update_anywhere_cache.php | 75 - .../update_folder_intelligence_config.php | 62 - ...pdate_organization_intelligence_config.php | 62 - .../update_project_intelligence_config.php | 62 - .../v2/src/V2/Client/StorageControlClient.php | 1224 --------- .../v2/src/V2/gapic_metadata.json | 153 -- .../storage_control_client_config.json | 183 -- .../storage_control_descriptor_config.php | 516 ---- .../storage_control_rest_client_config.php | 109 - .../V2/Client/StorageControlClientTest.php | 2297 ----------------- 87 files changed, 189 insertions(+), 14471 deletions(-) rename {owl-bot-staging/StorageControl/v2 => StorageControl}/samples/V2/StorageControlClient/delete_folder_recursive.php (100%) rename {owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control => StorageControl/src}/V2/DeleteFolderRecursiveMetadata.php (100%) rename {owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control => StorageControl/src}/V2/DeleteFolderRecursiveRequest.php (100%) delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/GPBMetadata/Google/Storage/Control/V2/StorageControl.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/AnywhereCache.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CommonLongRunningOperationMetadata.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateAnywhereCacheMetadata.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateAnywhereCacheRequest.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateFolderRequest.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateManagedFolderRequest.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteFolderRequest.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteManagedFolderRequest.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DisableAnywhereCacheRequest.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/Folder.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetAnywhereCacheRequest.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetFolderIntelligenceConfigRequest.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetFolderRequest.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetManagedFolderRequest.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetOrganizationIntelligenceConfigRequest.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetProjectIntelligenceConfigRequest.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetStorageLayoutRequest.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/EditionConfig.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/EffectiveIntelligenceConfig.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/EffectiveIntelligenceConfig/EffectiveEdition.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/Filter.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/Filter/CloudStorageBuckets.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/Filter/CloudStorageLocations.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/TrialConfig.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListAnywhereCachesRequest.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListAnywhereCachesResponse.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListFoldersRequest.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListFoldersResponse.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListManagedFoldersRequest.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListManagedFoldersResponse.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ManagedFolder.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/PauseAnywhereCacheRequest.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/PendingRenameInfo.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/RenameFolderMetadata.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/RenameFolderRequest.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ResumeAnywhereCacheRequest.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout/CustomPlacementConfig.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout/HierarchicalNamespace.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateAnywhereCacheMetadata.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateAnywhereCacheRequest.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateFolderIntelligenceConfigRequest.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateOrganizationIntelligenceConfigRequest.php delete mode 100644 owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateProjectIntelligenceConfigRequest.php delete mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_anywhere_cache.php delete mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_folder.php delete mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_managed_folder.php delete mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/delete_folder.php delete mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/delete_managed_folder.php delete mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/disable_anywhere_cache.php delete mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_anywhere_cache.php delete mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_folder.php delete mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_folder_intelligence_config.php delete mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_iam_policy.php delete mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_managed_folder.php delete mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_organization_intelligence_config.php delete mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_project_intelligence_config.php delete mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_storage_layout.php delete mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_anywhere_caches.php delete mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_folders.php delete mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_managed_folders.php delete mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/pause_anywhere_cache.php delete mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/rename_folder.php delete mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/resume_anywhere_cache.php delete mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/set_iam_policy.php delete mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/update_anywhere_cache.php delete mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/update_folder_intelligence_config.php delete mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/update_organization_intelligence_config.php delete mode 100644 owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/update_project_intelligence_config.php delete mode 100644 owl-bot-staging/StorageControl/v2/src/V2/Client/StorageControlClient.php delete mode 100644 owl-bot-staging/StorageControl/v2/src/V2/gapic_metadata.json delete mode 100644 owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_client_config.json delete mode 100644 owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_descriptor_config.php delete mode 100644 owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_rest_client_config.php delete mode 100644 owl-bot-staging/StorageControl/v2/tests/Unit/V2/Client/StorageControlClientTest.php diff --git a/StorageControl/metadata/V2/StorageControl.php b/StorageControl/metadata/V2/StorageControl.php index 92bb95ee769fed55248474d47df2ad7406ecfb17..c43fec0a339886db8233f0a9a54591e8f46d3014 100644 GIT binary patch delta 288 zcmbQ!%s8uqal>U6mfy8p`V+nNH?y&pa%goiaml!(=A@RSy5;Ajq!tCGCYKf!XO^V~ zr52W^7MBPabFt(l=B7$8P8Q_SVbq+QC@dw+q`;`b?8N-Qk&K0z+dG_V8WGgBm(Hrw)-NHbm1 z*}PfHj#>I4BbO*Pjj2NBlN;HkC--Udu|Zrtd7hyLTfr$uGcM7|8}&uyg|J$f>YG}U Wn37nMIC;0W#Uumv%|CRP2m=5m>syup delta 45 zcmV+|0Mh@Ohyk2~0kG2q1pRmlFOf?xvjzoq2(yR|#{sk45N{g-?kclQEItFXZ!oJ9 Di0%-S diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/delete_folder_recursive.php b/StorageControl/samples/V2/StorageControlClient/delete_folder_recursive.php similarity index 100% rename from owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/delete_folder_recursive.php rename to StorageControl/samples/V2/StorageControlClient/delete_folder_recursive.php diff --git a/StorageControl/src/V2/Client/StorageControlClient.php b/StorageControl/src/V2/Client/StorageControlClient.php index b0619544d345..523b35f2033b 100644 --- a/StorageControl/src/V2/Client/StorageControlClient.php +++ b/StorageControl/src/V2/Client/StorageControlClient.php @@ -44,6 +44,7 @@ use Google\Cloud\Storage\Control\V2\CreateAnywhereCacheRequest; use Google\Cloud\Storage\Control\V2\CreateFolderRequest; use Google\Cloud\Storage\Control\V2\CreateManagedFolderRequest; +use Google\Cloud\Storage\Control\V2\DeleteFolderRecursiveRequest; use Google\Cloud\Storage\Control\V2\DeleteFolderRequest; use Google\Cloud\Storage\Control\V2\DeleteManagedFolderRequest; use Google\Cloud\Storage\Control\V2\DisableAnywhereCacheRequest; @@ -88,6 +89,7 @@ * @method PromiseInterface createFolderAsync(CreateFolderRequest $request, array $optionalArgs = []) * @method PromiseInterface createManagedFolderAsync(CreateManagedFolderRequest $request, array $optionalArgs = []) * @method PromiseInterface deleteFolderAsync(DeleteFolderRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteFolderRecursiveAsync(DeleteFolderRecursiveRequest $request, array $optionalArgs = []) * @method PromiseInterface deleteManagedFolderAsync(DeleteManagedFolderRequest $request, array $optionalArgs = []) * @method PromiseInterface disableAnywhereCacheAsync(DisableAnywhereCacheRequest $request, array $optionalArgs = []) * @method PromiseInterface getAnywhereCacheAsync(GetAnywhereCacheRequest $request, array $optionalArgs = []) @@ -594,6 +596,35 @@ public function deleteFolder(DeleteFolderRequest $request, array $callOptions = $this->startApiCall('DeleteFolder', $request, $callOptions)->wait(); } + /** + * Deletes a folder recursively. This operation is only applicable to a + * hierarchical namespace enabled bucket. + * + * The async variant is {@see StorageControlClient::deleteFolderRecursiveAsync()} . + * + * @example samples/V2/StorageControlClient/delete_folder_recursive.php + * + * @param DeleteFolderRecursiveRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteFolderRecursive( + DeleteFolderRecursiveRequest $request, + array $callOptions = [] + ): OperationResponse { + return $this->startApiCall('DeleteFolderRecursive', $request, $callOptions)->wait(); + } + /** * Permanently deletes an empty managed folder. * diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteFolderRecursiveMetadata.php b/StorageControl/src/V2/DeleteFolderRecursiveMetadata.php similarity index 100% rename from owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteFolderRecursiveMetadata.php rename to StorageControl/src/V2/DeleteFolderRecursiveMetadata.php diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteFolderRecursiveRequest.php b/StorageControl/src/V2/DeleteFolderRecursiveRequest.php similarity index 100% rename from owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteFolderRecursiveRequest.php rename to StorageControl/src/V2/DeleteFolderRecursiveRequest.php diff --git a/StorageControl/src/V2/gapic_metadata.json b/StorageControl/src/V2/gapic_metadata.json index 3ed2f81e9f0a..86b444f90e16 100644 --- a/StorageControl/src/V2/gapic_metadata.json +++ b/StorageControl/src/V2/gapic_metadata.json @@ -30,6 +30,11 @@ "deleteFolder" ] }, + "DeleteFolderRecursive": { + "methods": [ + "deleteFolderRecursive" + ] + }, "DeleteManagedFolder": { "methods": [ "deleteManagedFolder" diff --git a/StorageControl/src/V2/resources/storage_control_client_config.json b/StorageControl/src/V2/resources/storage_control_client_config.json index 2c9634fe7301..93b69f4f75bf 100644 --- a/StorageControl/src/V2/resources/storage_control_client_config.json +++ b/StorageControl/src/V2/resources/storage_control_client_config.json @@ -62,6 +62,11 @@ "retry_codes_name": "no_retry_1_codes", "retry_params_name": "no_retry_1_params" }, + "DeleteFolderRecursive": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, "DeleteManagedFolder": { "timeout_millis": 60000, "retry_codes_name": "no_retry_1_codes", diff --git a/StorageControl/src/V2/resources/storage_control_descriptor_config.php b/StorageControl/src/V2/resources/storage_control_descriptor_config.php index 27bc04c0f18d..68d8f4d8702d 100644 --- a/StorageControl/src/V2/resources/storage_control_descriptor_config.php +++ b/StorageControl/src/V2/resources/storage_control_descriptor_config.php @@ -45,6 +45,31 @@ 'requestId' => \Google\Api\FieldInfo\Format::UUID4, ], ], + 'DeleteFolderRecursive' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Storage\Control\V2\DeleteFolderRecursiveMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'bucket', + 'fieldAccessors' => [ + 'getName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', + ], + ], + ], + 'autoPopulatedFields' => [ + 'requestId' => \Google\Api\FieldInfo\Format::UUID4, + ], + ], 'RenameFolder' => [ 'longRunning' => [ 'operationReturnType' => '\Google\Cloud\Storage\Control\V2\Folder', diff --git a/StorageControl/tests/Unit/V2/Client/StorageControlClientTest.php b/StorageControl/tests/Unit/V2/Client/StorageControlClientTest.php index 191895a35b46..6e6b375e8195 100644 --- a/StorageControl/tests/Unit/V2/Client/StorageControlClientTest.php +++ b/StorageControl/tests/Unit/V2/Client/StorageControlClientTest.php @@ -36,6 +36,7 @@ use Google\Cloud\Storage\Control\V2\CreateAnywhereCacheRequest; use Google\Cloud\Storage\Control\V2\CreateFolderRequest; use Google\Cloud\Storage\Control\V2\CreateManagedFolderRequest; +use Google\Cloud\Storage\Control\V2\DeleteFolderRecursiveRequest; use Google\Cloud\Storage\Control\V2\DeleteFolderRequest; use Google\Cloud\Storage\Control\V2\DeleteManagedFolderRequest; use Google\Cloud\Storage\Control\V2\DisableAnywhereCacheRequest; @@ -462,6 +463,128 @@ public function deleteFolderExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function deleteFolderRecursiveTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteFolderRecursiveTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteFolderRecursiveTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); + $request = (new DeleteFolderRecursiveRequest())->setName($formattedName); + $response = $gapicClient->deleteFolderRecursive($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.storage.control.v2.StorageControl/DeleteFolderRecursive', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteFolderRecursiveTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteFolderRecursiveExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteFolderRecursiveTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); + $request = (new DeleteFolderRecursiveRequest())->setName($formattedName); + $response = $gapicClient->deleteFolderRecursive($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteFolderRecursiveTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + /** @test */ public function deleteManagedFolderTest() { diff --git a/owl-bot-staging/StorageControl/v2/proto/src/GPBMetadata/Google/Storage/Control/V2/StorageControl.php b/owl-bot-staging/StorageControl/v2/proto/src/GPBMetadata/Google/Storage/Control/V2/StorageControl.php deleted file mode 100644 index c43fec0a339886db8233f0a9a54591e8f46d3014..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 17434 zcmdrUOKcm*HA`ByG>T<;6j?GI+cfPsvMiG@<4;4!X_wTuuq8oOj35w7tjLwL^^(i( zE@jzeolH*YRo&KHy_{UWlXTbgWX-l*t7MtU<@(BsZYN7trDmAA zolYjl=aRE?i^+-cnZ*;Z)UoPzNzWx$Eo;@(GmdN7+Nz!@Syk7z%*=XLJSy@>X$l*m zs#ejRnpV=2Q}g-jx~r8nS6iB*V3uw$FiQmnX6a`33PL4QbDSg};v?uDO2S{QzHAz$ zq~mHX{5xehMWbrChGrUffvKy>70q;X0MR^mrCu$$hE+|H1#{JsK5{0>V3N6~Y8D9L zYEsZOPvinJS(>T3x?R=GrE%RU*+vcMorkHp+^X(+(j-qt&TzB@oUxJ|VKnA)O+;Qz zx^`XnV^1b+-L2czE0k^mVAK1w6d*OVW-O`Iszsz=Rh?XJo2P9MtriwcL$A7>t(i1* zvz*u0v~|O>cd&G(x?**2ZTFuCmsE4rl zl{oGjSRrmuT;_hjCmd;-V1TvrL5?v)z}noT`OvU$oz3i)j~wG8hE~a}pU=R*VvSlS zA5X~R(%4BpW^UVA#`5f}0YQyNxlEZG6CW2WdE+`U7d|L5fH%mbQURmjGla;z8LrSg zn~*w-4$kYUS87_~@AmOj; zCD+N^wzIl7NO%tdn9zb4zPXGt*CfQ&I2;I?_A~5*nXLG!>s# z$jsvi*^Hi|Q647B=*jnftSX;8`0y{?v2G=wK*PmmSQKOa7tomp=; zncrR}seb@p#w($~#mjD5eInrRYF;Np;%A6flGkeePPf zbQW=_#uPjNhGXk1#s&>G{2@Ro>!wjLpp+c$7V1@S5)GL8hEcLsZLPLul!}lYZFiWt z8&&i%bWolF5r&2o4q0}No+jr=Eu#TR8cq%BMIC36hyY;VaR`d-Efo);166&)E&3QI zR^F5PK@1JBI38?lBm_ndA1O3ghS+0NX<<~{b_-8#F&q+NSm1~fVn`$j3^7dnyB1>Z z$I!E~D{_YxrYU@qrM!qy_Dt(2OO!(MpTa`zx$scyrAs9!-V%B4V!VAPhEfHqQn9L} z4qjk&uvZ3)&0%BSCX$Jex6h+)a1WO1S^VuZ)e~7nKm=uod#A=CGIhi_K8X(TETxx= zB@MQhrb#WBW-J=ESL-I=mF%P4Dw#o9j8Fgu(w1pSaHJsjTbR^S0FteiPLXjjg zXfTijC_MUzITeKv9GVV#5+i6Z5F9>$_CayGZ0codg59}$kJJrxszsS9NdcdaQmt}G zOp~L1(pM+DU;3VULqS7OwMuA2Sj|a$g)v&Zo{mUqpO?j%JIHC4*@!3*V%S zgoH5(0*NIt3?-=yreV(_`$}{DkosW^C0O#1pbI92-?FOlvsE^fyqalRw~JNCy|f3y z(s{$CbeAi}-zw-ZDcU9RcsrTLGlJdO(8xM&-jk;`P$Gx}zWY$o0ojCD+Ud|x=B5N_$oLs~R=r(>iI0=1)7t{9F3EiT>-WX+K2I1J~XLAcn2Kfe!k6$#e- zUbLqOxbg$&V6hQQiiqqL+VJ{(ij3OVE{TlBqsJH7PoUqyyT~J|as+vXZWFrj z>1Zm)P??XtZDq9F;hU7b{wZ=l2TTHW~!FyBE5IKZq|J_FS2w2qb} z^+bgIBVM&gn0H*YNKhb>Hnw3Q4mNdQ8w?`AlXzJo0S6Md%MwjW;Ze#G30CW}8A)@eWMLtVmG^u*G9)$@XOB~c@CU@Y;N=H z9CKR1fU^a!0w=S~UBpQ{WW{28s=+oq!r}Y zEIC6Eh^MZj{>G*F1Ufn~IXO{SoVhtsBp1$R=4Okp%-)!vD9lXGOpNzGg}c$7*}2(? zeg!{`x^FD1v*YT*cz-NWK)pWKBr#6ks2MgtyN?#*QYExsikG0agdn3ZH#<2q)j&-z z+BY*hJ+Uye$OsyrxuNE-0iiL8yg2SbU5g7d>b3r^+*`3n>YFiiM#S%iBmL&+g}=m3 zzr3US&5UPynS0{nX2vgYo>#6|_NrDj?y}oOnS1ax`r=$bVJ@%%E#hMk;!#Qaj2I`2 zn<*qG?`K(2JLe;{SqP$bnF}^7R_dPX$gGK_#(dduSL@vm74#hAi#3A3_#FK~L8lo< z^X#_C7oVkDXatT8q8Z+orE`Sy^c>-A2VR`gQOdhn(^_XRGC7PgiOjfV&t_Thbs=j%Gv@o4Z)7fq- zb$UzX`U=#Gp#hc=Nhcx*(WK90rHpIQ_-S(3( zgtEX4N}4Z(zUu*xn}dW5w=oB4vY;%waCaP>fmV8dP{Qxvu&xJ*Zt`?NZ&a{{=j;YBM@d0rMmB^p+CD zQ~*42eh9fh=4PzUu8NaQ1m)~Sd>IYMbJ8SzL?{e?4Hv+In&tRXNGu9kAh-|n7fHN3 z51+pPe`#*Ahx$wN^e0H~FTuV7TJxc?GGP7_q?kufNnh=vr!@J=(n_PJgui|Cl&1@N z!@?Meo{g(IjGiAU=-IFx6Art27q(E)A67s&Zv;~XUTwWjwlkOT1@cPeJrX&t`gRhc z`Ql_o1NuIj_}v&f&cavAogh|2qDh;zJ7n!mWlKG7G&lVH!IQFG%uZ9b1Lo2o+JPu? zQY(u0{xP&?j(EGOW+mXT8?_ucS% zH-MkV&?#mBZP=U)VKWMV9di00sxg$a*TapWL&*f2#E+q$07~`V_{Aw97I@Dxy?&lF zUA#fT@?gUp_SSFe)h)H#=5KY<;%^F0fW0SjA8O1u(7s3XK2UkXM@SQu{=qg>7Pr&` zg32-Wvgqy-`+a!lY7t)AA!5^Qeo4*2UiHZZ+dM@Oex^aZK{I)Fe;=&rnQd;i(NUHj zD6JK6!KZ+c@FtzL%-*VmX5AIvD)COGKMV0gxeT=SD*n66kf28s@5LUfheS6=KJWQR zy&qe1-I|ljWNzQS%?04S;HlN!HFysh4u8+V+XwE7Wmm>Jo1TW(8q4Rbs(GjF!m_?D zh+L_g^qidZbvs!{kQF;cMi!9^;*Bty9}=w0`o6C c@4XQ}#(q)4_X89ye|&<@WIqzIi8c}X9|xg4qyPW_ diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/AnywhereCache.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/AnywhereCache.php deleted file mode 100644 index 752a555a8e20..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/AnywhereCache.php +++ /dev/null @@ -1,383 +0,0 @@ -google.storage.control.v2.AnywhereCache - */ -class AnywhereCache extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. The resource name of this AnywhereCache. - * Format: - * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $name = ''; - /** - * Immutable. The zone in which the cache instance is running. For example, - * us-central1-a. - * - * Generated from protobuf field string zone = 10 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $zone = ''; - /** - * Cache entry TTL (ranges between 1h to 7d). This is a cache-level config - * that defines how long a cache entry can live. Default ttl value (24hrs) - * is applied if not specified in the create request. TTL must be in whole - * seconds. - * - * Generated from protobuf field .google.protobuf.Duration ttl = 3; - */ - protected $ttl = null; - /** - * Cache admission policy. Valid policies includes: - * `admit-on-first-miss` and `admit-on-second-miss`. Defaults to - * `admit-on-first-miss`. Default value is applied if not specified in the - * create request. - * - * Generated from protobuf field string admission_policy = 9; - */ - protected $admission_policy = ''; - /** - * Output only. Cache state including RUNNING, CREATING, DISABLED and PAUSED. - * - * Generated from protobuf field string state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = ''; - /** - * Output only. Time when Anywhere cache instance is allocated. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Time when Anywhere cache instance is last updated, including - * creation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. True if there is an active update operation against this cache - * instance. Subsequential update requests will be rejected if this field is - * true. Output only. - * - * Generated from protobuf field bool pending_update = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $pending_update = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Immutable. The resource name of this AnywhereCache. - * Format: - * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` - * @type string $zone - * Immutable. The zone in which the cache instance is running. For example, - * us-central1-a. - * @type \Google\Protobuf\Duration $ttl - * Cache entry TTL (ranges between 1h to 7d). This is a cache-level config - * that defines how long a cache entry can live. Default ttl value (24hrs) - * is applied if not specified in the create request. TTL must be in whole - * seconds. - * @type string $admission_policy - * Cache admission policy. Valid policies includes: - * `admit-on-first-miss` and `admit-on-second-miss`. Defaults to - * `admit-on-first-miss`. Default value is applied if not specified in the - * create request. - * @type string $state - * Output only. Cache state including RUNNING, CREATING, DISABLED and PAUSED. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Time when Anywhere cache instance is allocated. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Time when Anywhere cache instance is last updated, including - * creation. - * @type bool $pending_update - * Output only. True if there is an active update operation against this cache - * instance. Subsequential update requests will be rejected if this field is - * true. Output only. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. The resource name of this AnywhereCache. - * Format: - * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Immutable. The resource name of this AnywhereCache. - * Format: - * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Immutable. The zone in which the cache instance is running. For example, - * us-central1-a. - * - * Generated from protobuf field string zone = 10 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getZone() - { - return $this->zone; - } - - /** - * Immutable. The zone in which the cache instance is running. For example, - * us-central1-a. - * - * Generated from protobuf field string zone = 10 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setZone($var) - { - GPBUtil::checkString($var, True); - $this->zone = $var; - - return $this; - } - - /** - * Cache entry TTL (ranges between 1h to 7d). This is a cache-level config - * that defines how long a cache entry can live. Default ttl value (24hrs) - * is applied if not specified in the create request. TTL must be in whole - * seconds. - * - * Generated from protobuf field .google.protobuf.Duration ttl = 3; - * @return \Google\Protobuf\Duration|null - */ - public function getTtl() - { - return $this->ttl; - } - - public function hasTtl() - { - return isset($this->ttl); - } - - public function clearTtl() - { - unset($this->ttl); - } - - /** - * Cache entry TTL (ranges between 1h to 7d). This is a cache-level config - * that defines how long a cache entry can live. Default ttl value (24hrs) - * is applied if not specified in the create request. TTL must be in whole - * seconds. - * - * Generated from protobuf field .google.protobuf.Duration ttl = 3; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTtl($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->ttl = $var; - - return $this; - } - - /** - * Cache admission policy. Valid policies includes: - * `admit-on-first-miss` and `admit-on-second-miss`. Defaults to - * `admit-on-first-miss`. Default value is applied if not specified in the - * create request. - * - * Generated from protobuf field string admission_policy = 9; - * @return string - */ - public function getAdmissionPolicy() - { - return $this->admission_policy; - } - - /** - * Cache admission policy. Valid policies includes: - * `admit-on-first-miss` and `admit-on-second-miss`. Defaults to - * `admit-on-first-miss`. Default value is applied if not specified in the - * create request. - * - * Generated from protobuf field string admission_policy = 9; - * @param string $var - * @return $this - */ - public function setAdmissionPolicy($var) - { - GPBUtil::checkString($var, True); - $this->admission_policy = $var; - - return $this; - } - - /** - * Output only. Cache state including RUNNING, CREATING, DISABLED and PAUSED. - * - * Generated from protobuf field string state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Cache state including RUNNING, CREATING, DISABLED and PAUSED. - * - * Generated from protobuf field string state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkString($var, True); - $this->state = $var; - - return $this; - } - - /** - * Output only. Time when Anywhere cache instance is allocated. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Time when Anywhere cache instance is allocated. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Time when Anywhere cache instance is last updated, including - * creation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. Time when Anywhere cache instance is last updated, including - * creation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. True if there is an active update operation against this cache - * instance. Subsequential update requests will be rejected if this field is - * true. Output only. - * - * Generated from protobuf field bool pending_update = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getPendingUpdate() - { - return $this->pending_update; - } - - /** - * Output only. True if there is an active update operation against this cache - * instance. Subsequential update requests will be rejected if this field is - * true. Output only. - * - * Generated from protobuf field bool pending_update = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setPendingUpdate($var) - { - GPBUtil::checkBool($var); - $this->pending_update = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CommonLongRunningOperationMetadata.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CommonLongRunningOperationMetadata.php deleted file mode 100644 index 67e1c36d73d3..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CommonLongRunningOperationMetadata.php +++ /dev/null @@ -1,273 +0,0 @@ -google.storage.control.v2.CommonLongRunningOperationMetadata - */ -class CommonLongRunningOperationMetadata 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. The time the operation was last modified. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. The type of operation invoked. - * - * Generated from protobuf field string type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $type = ''; - /** - * Output only. Identifies whether the user has requested cancellation. - * - * Generated from protobuf field bool requested_cancellation = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $requested_cancellation = false; - /** - * Output only. The estimated progress of the operation in percentage [0, - * 100]. The value -1 means the progress is unknown. - * - * Generated from protobuf field int32 progress_percent = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $progress_percent = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time the operation finished running. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time the operation was last modified. - * @type string $type - * Output only. The type of operation invoked. - * @type bool $requested_cancellation - * Output only. Identifies whether the user has requested cancellation. - * @type int $progress_percent - * Output only. The estimated progress of the operation in percentage [0, - * 100]. The value -1 means the progress is unknown. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::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. The time the operation was last modified. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time the operation was last modified. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. The type of operation invoked. - * - * Generated from protobuf field string type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Output only. The type of operation invoked. - * - * Generated from protobuf field string type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * Output only. Identifies whether the user has requested cancellation. - * - * Generated from protobuf field bool requested_cancellation = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getRequestedCancellation() - { - return $this->requested_cancellation; - } - - /** - * Output only. Identifies whether the user has requested cancellation. - * - * Generated from protobuf field bool requested_cancellation = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setRequestedCancellation($var) - { - GPBUtil::checkBool($var); - $this->requested_cancellation = $var; - - return $this; - } - - /** - * Output only. The estimated progress of the operation in percentage [0, - * 100]. The value -1 means the progress is unknown. - * - * Generated from protobuf field int32 progress_percent = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getProgressPercent() - { - return $this->progress_percent; - } - - /** - * Output only. The estimated progress of the operation in percentage [0, - * 100]. The value -1 means the progress is unknown. - * - * Generated from protobuf field int32 progress_percent = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setProgressPercent($var) - { - GPBUtil::checkInt32($var); - $this->progress_percent = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateAnywhereCacheMetadata.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateAnywhereCacheMetadata.php deleted file mode 100644 index 83efefe45254..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateAnywhereCacheMetadata.php +++ /dev/null @@ -1,274 +0,0 @@ -google.storage.control.v2.CreateAnywhereCacheMetadata - */ -class CreateAnywhereCacheMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Generic metadata for the long running operation. - * - * Generated from protobuf field .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; - */ - protected $common_metadata = null; - /** - * Anywhere Cache ID. - * - * Generated from protobuf field optional string anywhere_cache_id = 2; - */ - protected $anywhere_cache_id = null; - /** - * The zone in which the cache instance is running. For example, - * us-central1-a. - * - * Generated from protobuf field optional string zone = 6; - */ - protected $zone = null; - /** - * Anywhere Cache entry's TTL. A cache-level config that is applied to all new - * cache entries on admission. Default ttl value (24hrs) is applied if not - * specified in the create request. - * - * Generated from protobuf field optional .google.protobuf.Duration ttl = 3; - */ - protected $ttl = null; - /** - * Anywhere Cache entry Admission Policy in kebab-case (e.g., - * "admit-on-first-miss"). Default admission policy (admit-on-first-miss) is - * applied if not specified in the create request. - * - * Generated from protobuf field optional string admission_policy = 5; - */ - protected $admission_policy = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata $common_metadata - * Generic metadata for the long running operation. - * @type string $anywhere_cache_id - * Anywhere Cache ID. - * @type string $zone - * The zone in which the cache instance is running. For example, - * us-central1-a. - * @type \Google\Protobuf\Duration $ttl - * Anywhere Cache entry's TTL. A cache-level config that is applied to all new - * cache entries on admission. Default ttl value (24hrs) is applied if not - * specified in the create request. - * @type string $admission_policy - * Anywhere Cache entry Admission Policy in kebab-case (e.g., - * "admit-on-first-miss"). Default admission policy (admit-on-first-miss) is - * applied if not specified in the create request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Generic metadata for the long running operation. - * - * Generated from protobuf field .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; - * @return \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata|null - */ - public function getCommonMetadata() - { - return $this->common_metadata; - } - - public function hasCommonMetadata() - { - return isset($this->common_metadata); - } - - public function clearCommonMetadata() - { - unset($this->common_metadata); - } - - /** - * Generic metadata for the long running operation. - * - * Generated from protobuf field .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; - * @param \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata $var - * @return $this - */ - public function setCommonMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata::class); - $this->common_metadata = $var; - - return $this; - } - - /** - * Anywhere Cache ID. - * - * Generated from protobuf field optional string anywhere_cache_id = 2; - * @return string - */ - public function getAnywhereCacheId() - { - return isset($this->anywhere_cache_id) ? $this->anywhere_cache_id : ''; - } - - public function hasAnywhereCacheId() - { - return isset($this->anywhere_cache_id); - } - - public function clearAnywhereCacheId() - { - unset($this->anywhere_cache_id); - } - - /** - * Anywhere Cache ID. - * - * Generated from protobuf field optional string anywhere_cache_id = 2; - * @param string $var - * @return $this - */ - public function setAnywhereCacheId($var) - { - GPBUtil::checkString($var, True); - $this->anywhere_cache_id = $var; - - return $this; - } - - /** - * The zone in which the cache instance is running. For example, - * us-central1-a. - * - * Generated from protobuf field optional string zone = 6; - * @return string - */ - public function getZone() - { - return isset($this->zone) ? $this->zone : ''; - } - - public function hasZone() - { - return isset($this->zone); - } - - public function clearZone() - { - unset($this->zone); - } - - /** - * The zone in which the cache instance is running. For example, - * us-central1-a. - * - * Generated from protobuf field optional string zone = 6; - * @param string $var - * @return $this - */ - public function setZone($var) - { - GPBUtil::checkString($var, True); - $this->zone = $var; - - return $this; - } - - /** - * Anywhere Cache entry's TTL. A cache-level config that is applied to all new - * cache entries on admission. Default ttl value (24hrs) is applied if not - * specified in the create request. - * - * Generated from protobuf field optional .google.protobuf.Duration ttl = 3; - * @return \Google\Protobuf\Duration|null - */ - public function getTtl() - { - return $this->ttl; - } - - public function hasTtl() - { - return isset($this->ttl); - } - - public function clearTtl() - { - unset($this->ttl); - } - - /** - * Anywhere Cache entry's TTL. A cache-level config that is applied to all new - * cache entries on admission. Default ttl value (24hrs) is applied if not - * specified in the create request. - * - * Generated from protobuf field optional .google.protobuf.Duration ttl = 3; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTtl($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->ttl = $var; - - return $this; - } - - /** - * Anywhere Cache entry Admission Policy in kebab-case (e.g., - * "admit-on-first-miss"). Default admission policy (admit-on-first-miss) is - * applied if not specified in the create request. - * - * Generated from protobuf field optional string admission_policy = 5; - * @return string - */ - public function getAdmissionPolicy() - { - return isset($this->admission_policy) ? $this->admission_policy : ''; - } - - public function hasAdmissionPolicy() - { - return isset($this->admission_policy); - } - - public function clearAdmissionPolicy() - { - unset($this->admission_policy); - } - - /** - * Anywhere Cache entry Admission Policy in kebab-case (e.g., - * "admit-on-first-miss"). Default admission policy (admit-on-first-miss) is - * applied if not specified in the create request. - * - * Generated from protobuf field optional string admission_policy = 5; - * @param string $var - * @return $this - */ - public function setAdmissionPolicy($var) - { - GPBUtil::checkString($var, True); - $this->admission_policy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateAnywhereCacheRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateAnywhereCacheRequest.php deleted file mode 100644 index 53070b22a41e..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateAnywhereCacheRequest.php +++ /dev/null @@ -1,189 +0,0 @@ -google.storage.control.v2.CreateAnywhereCacheRequest - */ -class CreateAnywhereCacheRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The bucket to which this cache belongs. - * Format: `projects/{project}/buckets/{bucket}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Properties of the Anywhere Cache instance being created. - * The parent bucket name is specified in the `parent` field. Server uses the - * default value of `ttl` or `admission_policy` if not specified in - * request. - * - * Generated from protobuf field .google.storage.control.v2.AnywhereCache anywhere_cache = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $anywhere_cache = null; - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. This request is only - * idempotent if a `request_id` is provided. - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The bucket to which this cache belongs. - * Format: `projects/{project}/buckets/{bucket}` - * Please see {@see StorageControlClient::bucketName()} for help formatting this field. - * @param \Google\Cloud\Storage\Control\V2\AnywhereCache $anywhereCache Required. Properties of the Anywhere Cache instance being created. - * The parent bucket name is specified in the `parent` field. Server uses the - * default value of `ttl` or `admission_policy` if not specified in - * request. - * - * @return \Google\Cloud\Storage\Control\V2\CreateAnywhereCacheRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Storage\Control\V2\AnywhereCache $anywhereCache): self - { - return (new self()) - ->setParent($parent) - ->setAnywhereCache($anywhereCache); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The bucket to which this cache belongs. - * Format: `projects/{project}/buckets/{bucket}` - * @type \Google\Cloud\Storage\Control\V2\AnywhereCache $anywhere_cache - * Required. Properties of the Anywhere Cache instance being created. - * The parent bucket name is specified in the `parent` field. Server uses the - * default value of `ttl` or `admission_policy` if not specified in - * request. - * @type string $request_id - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. This request is only - * idempotent if a `request_id` is provided. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. The bucket to which this cache belongs. - * Format: `projects/{project}/buckets/{bucket}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The bucket to which this cache belongs. - * Format: `projects/{project}/buckets/{bucket}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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. Properties of the Anywhere Cache instance being created. - * The parent bucket name is specified in the `parent` field. Server uses the - * default value of `ttl` or `admission_policy` if not specified in - * request. - * - * Generated from protobuf field .google.storage.control.v2.AnywhereCache anywhere_cache = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Storage\Control\V2\AnywhereCache|null - */ - public function getAnywhereCache() - { - return $this->anywhere_cache; - } - - public function hasAnywhereCache() - { - return isset($this->anywhere_cache); - } - - public function clearAnywhereCache() - { - unset($this->anywhere_cache); - } - - /** - * Required. Properties of the Anywhere Cache instance being created. - * The parent bucket name is specified in the `parent` field. Server uses the - * default value of `ttl` or `admission_policy` if not specified in - * request. - * - * Generated from protobuf field .google.storage.control.v2.AnywhereCache anywhere_cache = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Storage\Control\V2\AnywhereCache $var - * @return $this - */ - public function setAnywhereCache($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\AnywhereCache::class); - $this->anywhere_cache = $var; - - return $this; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. This request is only - * idempotent if a `request_id` is provided. - * - * 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. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. This request is only - * idempotent if a `request_id` is provided. - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateFolderRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateFolderRequest.php deleted file mode 100644 index fa07c167ad9d..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateFolderRequest.php +++ /dev/null @@ -1,280 +0,0 @@ -google.storage.control.v2.CreateFolderRequest - */ -class CreateFolderRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the bucket in which the folder will reside. The bucket - * must be a hierarchical namespace enabled bucket. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Properties of the new folder being created. - * The bucket and name of the folder are specified in the parent and folder_id - * fields, respectively. Populating those fields in `folder` will result in an - * error. - * - * Generated from protobuf field .google.storage.control.v2.Folder folder = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $folder = null; - /** - * Required. The full name of a folder, including all its parent folders. - * Folders use single '/' characters as a delimiter. - * The folder_id must end with a slash. - * For example, the folder_id of "books/biographies/" would create a new - * "biographies/" folder under the "books/" folder. - * - * Generated from protobuf field string folder_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $folder_id = ''; - /** - * Optional. If true, parent folder doesn't have to be present and all missing - * ancestor folders will be created atomically. - * - * Generated from protobuf field bool recursive = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $recursive = false; - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $parent Required. Name of the bucket in which the folder will reside. The bucket - * must be a hierarchical namespace enabled bucket. Please see - * {@see StorageControlClient::bucketName()} for help formatting this field. - * @param \Google\Cloud\Storage\Control\V2\Folder $folder Required. Properties of the new folder being created. - * The bucket and name of the folder are specified in the parent and folder_id - * fields, respectively. Populating those fields in `folder` will result in an - * error. - * @param string $folderId Required. The full name of a folder, including all its parent folders. - * Folders use single '/' characters as a delimiter. - * The folder_id must end with a slash. - * For example, the folder_id of "books/biographies/" would create a new - * "biographies/" folder under the "books/" folder. - * - * @return \Google\Cloud\Storage\Control\V2\CreateFolderRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Storage\Control\V2\Folder $folder, string $folderId): self - { - return (new self()) - ->setParent($parent) - ->setFolder($folder) - ->setFolderId($folderId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Name of the bucket in which the folder will reside. The bucket - * must be a hierarchical namespace enabled bucket. - * @type \Google\Cloud\Storage\Control\V2\Folder $folder - * Required. Properties of the new folder being created. - * The bucket and name of the folder are specified in the parent and folder_id - * fields, respectively. Populating those fields in `folder` will result in an - * error. - * @type string $folder_id - * Required. The full name of a folder, including all its parent folders. - * Folders use single '/' characters as a delimiter. - * The folder_id must end with a slash. - * For example, the folder_id of "books/biographies/" would create a new - * "biographies/" folder under the "books/" folder. - * @type bool $recursive - * Optional. If true, parent folder doesn't have to be present and all missing - * ancestor folders will be created atomically. - * @type string $request_id - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the bucket in which the folder will reside. The bucket - * must be a hierarchical namespace enabled bucket. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Name of the bucket in which the folder will reside. The bucket - * must be a hierarchical namespace enabled bucket. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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. Properties of the new folder being created. - * The bucket and name of the folder are specified in the parent and folder_id - * fields, respectively. Populating those fields in `folder` will result in an - * error. - * - * Generated from protobuf field .google.storage.control.v2.Folder folder = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Storage\Control\V2\Folder|null - */ - public function getFolder() - { - return $this->folder; - } - - public function hasFolder() - { - return isset($this->folder); - } - - public function clearFolder() - { - unset($this->folder); - } - - /** - * Required. Properties of the new folder being created. - * The bucket and name of the folder are specified in the parent and folder_id - * fields, respectively. Populating those fields in `folder` will result in an - * error. - * - * Generated from protobuf field .google.storage.control.v2.Folder folder = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Storage\Control\V2\Folder $var - * @return $this - */ - public function setFolder($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\Folder::class); - $this->folder = $var; - - return $this; - } - - /** - * Required. The full name of a folder, including all its parent folders. - * Folders use single '/' characters as a delimiter. - * The folder_id must end with a slash. - * For example, the folder_id of "books/biographies/" would create a new - * "biographies/" folder under the "books/" folder. - * - * Generated from protobuf field string folder_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getFolderId() - { - return $this->folder_id; - } - - /** - * Required. The full name of a folder, including all its parent folders. - * Folders use single '/' characters as a delimiter. - * The folder_id must end with a slash. - * For example, the folder_id of "books/biographies/" would create a new - * "biographies/" folder under the "books/" folder. - * - * Generated from protobuf field string folder_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setFolderId($var) - { - GPBUtil::checkString($var, True); - $this->folder_id = $var; - - return $this; - } - - /** - * Optional. If true, parent folder doesn't have to be present and all missing - * ancestor folders will be created atomically. - * - * Generated from protobuf field bool recursive = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getRecursive() - { - return $this->recursive; - } - - /** - * Optional. If true, parent folder doesn't have to be present and all missing - * ancestor folders will be created atomically. - * - * Generated from protobuf field bool recursive = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setRecursive($var) - { - GPBUtil::checkBool($var); - $this->recursive = $var; - - return $this; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateManagedFolderRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateManagedFolderRequest.php deleted file mode 100644 index e5320e9019f0..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/CreateManagedFolderRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.storage.control.v2.CreateManagedFolderRequest - */ -class CreateManagedFolderRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the bucket this managed folder belongs to. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Properties of the managed folder being created. - * The bucket and managed folder names are specified in the `parent` and - * `managed_folder_id` fields. Populating these fields in `managed_folder` - * will result in an error. - * - * Generated from protobuf field .google.storage.control.v2.ManagedFolder managed_folder = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $managed_folder = null; - /** - * Required. The name of the managed folder. It uses a single `/` as delimiter - * and leading and trailing `/` are allowed. - * - * Generated from protobuf field string managed_folder_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $managed_folder_id = ''; - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $parent Required. Name of the bucket this managed folder belongs to. Please see - * {@see StorageControlClient::bucketName()} for help formatting this field. - * @param \Google\Cloud\Storage\Control\V2\ManagedFolder $managedFolder Required. Properties of the managed folder being created. - * The bucket and managed folder names are specified in the `parent` and - * `managed_folder_id` fields. Populating these fields in `managed_folder` - * will result in an error. - * @param string $managedFolderId Required. The name of the managed folder. It uses a single `/` as delimiter - * and leading and trailing `/` are allowed. - * - * @return \Google\Cloud\Storage\Control\V2\CreateManagedFolderRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Storage\Control\V2\ManagedFolder $managedFolder, string $managedFolderId): self - { - return (new self()) - ->setParent($parent) - ->setManagedFolder($managedFolder) - ->setManagedFolderId($managedFolderId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Name of the bucket this managed folder belongs to. - * @type \Google\Cloud\Storage\Control\V2\ManagedFolder $managed_folder - * Required. Properties of the managed folder being created. - * The bucket and managed folder names are specified in the `parent` and - * `managed_folder_id` fields. Populating these fields in `managed_folder` - * will result in an error. - * @type string $managed_folder_id - * Required. The name of the managed folder. It uses a single `/` as delimiter - * and leading and trailing `/` are allowed. - * @type string $request_id - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the bucket this managed folder belongs to. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Name of the bucket this managed folder belongs to. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_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. Properties of the managed folder being created. - * The bucket and managed folder names are specified in the `parent` and - * `managed_folder_id` fields. Populating these fields in `managed_folder` - * will result in an error. - * - * Generated from protobuf field .google.storage.control.v2.ManagedFolder managed_folder = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Storage\Control\V2\ManagedFolder|null - */ - public function getManagedFolder() - { - return $this->managed_folder; - } - - public function hasManagedFolder() - { - return isset($this->managed_folder); - } - - public function clearManagedFolder() - { - unset($this->managed_folder); - } - - /** - * Required. Properties of the managed folder being created. - * The bucket and managed folder names are specified in the `parent` and - * `managed_folder_id` fields. Populating these fields in `managed_folder` - * will result in an error. - * - * Generated from protobuf field .google.storage.control.v2.ManagedFolder managed_folder = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Storage\Control\V2\ManagedFolder $var - * @return $this - */ - public function setManagedFolder($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\ManagedFolder::class); - $this->managed_folder = $var; - - return $this; - } - - /** - * Required. The name of the managed folder. It uses a single `/` as delimiter - * and leading and trailing `/` are allowed. - * - * Generated from protobuf field string managed_folder_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getManagedFolderId() - { - return $this->managed_folder_id; - } - - /** - * Required. The name of the managed folder. It uses a single `/` as delimiter - * and leading and trailing `/` are allowed. - * - * Generated from protobuf field string managed_folder_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setManagedFolderId($var) - { - GPBUtil::checkString($var, True); - $this->managed_folder_id = $var; - - return $this; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * 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. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteFolderRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteFolderRequest.php deleted file mode 100644 index a3523693513e..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteFolderRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.storage.control.v2.DeleteFolderRequest - */ -class DeleteFolderRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the folder. - * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` - * - * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Makes the operation only succeed conditional on whether the folder's - * current metageneration matches the given value. - * - * Generated from protobuf field optional int64 if_metageneration_match = 3; - */ - protected $if_metageneration_match = null; - /** - * Makes the operation only succeed conditional on whether the folder's - * current metageneration does not match the given value. - * - * Generated from protobuf field optional int64 if_metageneration_not_match = 4; - */ - protected $if_metageneration_not_match = null; - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $name Required. Name of the folder. - * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` - * Please see {@see StorageControlClient::folderName()} for help formatting this field. - * - * @return \Google\Cloud\Storage\Control\V2\DeleteFolderRequest - * - * @experimental - */ - public static function 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 folder. - * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` - * @type int|string $if_metageneration_match - * Makes the operation only succeed conditional on whether the folder's - * current metageneration matches the given value. - * @type int|string $if_metageneration_not_match - * Makes the operation only succeed conditional on whether the folder's - * current metageneration does not match the given value. - * @type string $request_id - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the folder. - * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` - * - * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the folder. - * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` - * - * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Makes the operation only succeed conditional on whether the folder's - * current metageneration matches the given value. - * - * Generated from protobuf field optional int64 if_metageneration_match = 3; - * @return int|string - */ - public function getIfMetagenerationMatch() - { - return isset($this->if_metageneration_match) ? $this->if_metageneration_match : 0; - } - - public function hasIfMetagenerationMatch() - { - return isset($this->if_metageneration_match); - } - - public function clearIfMetagenerationMatch() - { - unset($this->if_metageneration_match); - } - - /** - * Makes the operation only succeed conditional on whether the folder's - * current metageneration matches the given value. - * - * Generated from protobuf field optional int64 if_metageneration_match = 3; - * @param int|string $var - * @return $this - */ - public function setIfMetagenerationMatch($var) - { - GPBUtil::checkInt64($var); - $this->if_metageneration_match = $var; - - return $this; - } - - /** - * Makes the operation only succeed conditional on whether the folder's - * current metageneration does not match the given value. - * - * Generated from protobuf field optional int64 if_metageneration_not_match = 4; - * @return int|string - */ - public function getIfMetagenerationNotMatch() - { - return isset($this->if_metageneration_not_match) ? $this->if_metageneration_not_match : 0; - } - - public function hasIfMetagenerationNotMatch() - { - return isset($this->if_metageneration_not_match); - } - - public function clearIfMetagenerationNotMatch() - { - unset($this->if_metageneration_not_match); - } - - /** - * Makes the operation only succeed conditional on whether the folder's - * current metageneration does not match the given value. - * - * Generated from protobuf field optional int64 if_metageneration_not_match = 4; - * @param int|string $var - * @return $this - */ - public function setIfMetagenerationNotMatch($var) - { - GPBUtil::checkInt64($var); - $this->if_metageneration_not_match = $var; - - return $this; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteManagedFolderRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteManagedFolderRequest.php deleted file mode 100644 index 957f9300a277..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DeleteManagedFolderRequest.php +++ /dev/null @@ -1,271 +0,0 @@ -google.storage.control.v2.DeleteManagedFolderRequest - */ -class DeleteManagedFolderRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the managed folder. - * Format: - * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` - * - * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The operation succeeds conditional on the managed folder's current - * metageneration matching the value here specified. - * - * Generated from protobuf field optional int64 if_metageneration_match = 3; - */ - protected $if_metageneration_match = null; - /** - * The operation succeeds conditional on the managed folder's current - * metageneration NOT matching the value here specified. - * - * Generated from protobuf field optional int64 if_metageneration_not_match = 4; - */ - protected $if_metageneration_not_match = null; - /** - * Allows deletion of a managed folder even if it is not empty. - * A managed folder is empty if it manages no child managed folders or - * objects. Caller must have permission for - * storage.managedFolders.setIamPolicy. - * - * Generated from protobuf field bool allow_non_empty = 5; - */ - protected $allow_non_empty = false; - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $name Required. Name of the managed folder. - * Format: - * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` - * Please see {@see StorageControlClient::managedFolderName()} for help formatting this field. - * - * @return \Google\Cloud\Storage\Control\V2\DeleteManagedFolderRequest - * - * @experimental - */ - public static function 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 managed folder. - * Format: - * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` - * @type int|string $if_metageneration_match - * The operation succeeds conditional on the managed folder's current - * metageneration matching the value here specified. - * @type int|string $if_metageneration_not_match - * The operation succeeds conditional on the managed folder's current - * metageneration NOT matching the value here specified. - * @type bool $allow_non_empty - * Allows deletion of a managed folder even if it is not empty. - * A managed folder is empty if it manages no child managed folders or - * objects. Caller must have permission for - * storage.managedFolders.setIamPolicy. - * @type string $request_id - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the managed folder. - * Format: - * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` - * - * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the managed folder. - * Format: - * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` - * - * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The operation succeeds conditional on the managed folder's current - * metageneration matching the value here specified. - * - * Generated from protobuf field optional int64 if_metageneration_match = 3; - * @return int|string - */ - public function getIfMetagenerationMatch() - { - return isset($this->if_metageneration_match) ? $this->if_metageneration_match : 0; - } - - public function hasIfMetagenerationMatch() - { - return isset($this->if_metageneration_match); - } - - public function clearIfMetagenerationMatch() - { - unset($this->if_metageneration_match); - } - - /** - * The operation succeeds conditional on the managed folder's current - * metageneration matching the value here specified. - * - * Generated from protobuf field optional int64 if_metageneration_match = 3; - * @param int|string $var - * @return $this - */ - public function setIfMetagenerationMatch($var) - { - GPBUtil::checkInt64($var); - $this->if_metageneration_match = $var; - - return $this; - } - - /** - * The operation succeeds conditional on the managed folder's current - * metageneration NOT matching the value here specified. - * - * Generated from protobuf field optional int64 if_metageneration_not_match = 4; - * @return int|string - */ - public function getIfMetagenerationNotMatch() - { - return isset($this->if_metageneration_not_match) ? $this->if_metageneration_not_match : 0; - } - - public function hasIfMetagenerationNotMatch() - { - return isset($this->if_metageneration_not_match); - } - - public function clearIfMetagenerationNotMatch() - { - unset($this->if_metageneration_not_match); - } - - /** - * The operation succeeds conditional on the managed folder's current - * metageneration NOT matching the value here specified. - * - * Generated from protobuf field optional int64 if_metageneration_not_match = 4; - * @param int|string $var - * @return $this - */ - public function setIfMetagenerationNotMatch($var) - { - GPBUtil::checkInt64($var); - $this->if_metageneration_not_match = $var; - - return $this; - } - - /** - * Allows deletion of a managed folder even if it is not empty. - * A managed folder is empty if it manages no child managed folders or - * objects. Caller must have permission for - * storage.managedFolders.setIamPolicy. - * - * Generated from protobuf field bool allow_non_empty = 5; - * @return bool - */ - public function getAllowNonEmpty() - { - return $this->allow_non_empty; - } - - /** - * Allows deletion of a managed folder even if it is not empty. - * A managed folder is empty if it manages no child managed folders or - * objects. Caller must have permission for - * storage.managedFolders.setIamPolicy. - * - * Generated from protobuf field bool allow_non_empty = 5; - * @param bool $var - * @return $this - */ - public function setAllowNonEmpty($var) - { - GPBUtil::checkBool($var); - $this->allow_non_empty = $var; - - return $this; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DisableAnywhereCacheRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DisableAnywhereCacheRequest.php deleted file mode 100644 index 64e32b7ab883..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/DisableAnywhereCacheRequest.php +++ /dev/null @@ -1,128 +0,0 @@ -google.storage.control.v2.DisableAnywhereCacheRequest - */ -class DisableAnywhereCacheRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name field in the request should be: - * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. This request is only - * idempotent if a `request_id` is provided. - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $name Required. The name field in the request should be: - * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` - * Please see {@see StorageControlClient::anywhereCacheName()} for help formatting this field. - * - * @return \Google\Cloud\Storage\Control\V2\DisableAnywhereCacheRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name field in the request should be: - * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` - * @type string $request_id - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. This request is only - * idempotent if a `request_id` is provided. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name field in the request should be: - * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name field in the request should be: - * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. This request is only - * idempotent if a `request_id` is provided. - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. This request is only - * idempotent if a `request_id` is provided. - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/Folder.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/Folder.php deleted file mode 100644 index 3bcb0c88fcfc..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/Folder.php +++ /dev/null @@ -1,258 +0,0 @@ -google.storage.control.v2.Folder - */ -class Folder extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The name of this folder. - * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. The version of the metadata for this folder. Used for - * preconditions and for detecting changes in metadata. - * - * Generated from protobuf field int64 metageneration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $metageneration = 0; - /** - * Output only. The creation time of the folder. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The modification time of the folder. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. Only present if the folder is part of an ongoing RenameFolder - * operation. Contains information which can be used to query the operation - * status. The presence of this field also indicates all write operations are - * blocked for this folder, including folder, managed folder, and object - * operations. - * - * Generated from protobuf field .google.storage.control.v2.PendingRenameInfo pending_rename_info = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $pending_rename_info = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The name of this folder. - * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` - * @type int|string $metageneration - * Output only. The version of the metadata for this folder. Used for - * preconditions and for detecting changes in metadata. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation time of the folder. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The modification time of the folder. - * @type \Google\Cloud\Storage\Control\V2\PendingRenameInfo $pending_rename_info - * Output only. Only present if the folder is part of an ongoing RenameFolder - * operation. Contains information which can be used to query the operation - * status. The presence of this field also indicates all write operations are - * blocked for this folder, including folder, managed folder, and object - * operations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The name of this folder. - * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The name of this folder. - * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The version of the metadata for this folder. Used for - * preconditions and for detecting changes in metadata. - * - * Generated from protobuf field int64 metageneration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getMetageneration() - { - return $this->metageneration; - } - - /** - * Output only. The version of the metadata for this folder. Used for - * preconditions and for detecting changes in metadata. - * - * Generated from protobuf field int64 metageneration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setMetageneration($var) - { - GPBUtil::checkInt64($var); - $this->metageneration = $var; - - return $this; - } - - /** - * Output only. The creation time of the folder. - * - * 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 creation time of the folder. - * - * 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 modification time of the folder. - * - * 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 modification time of the folder. - * - * 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; - } - - /** - * Output only. Only present if the folder is part of an ongoing RenameFolder - * operation. Contains information which can be used to query the operation - * status. The presence of this field also indicates all write operations are - * blocked for this folder, including folder, managed folder, and object - * operations. - * - * Generated from protobuf field .google.storage.control.v2.PendingRenameInfo pending_rename_info = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Storage\Control\V2\PendingRenameInfo|null - */ - public function getPendingRenameInfo() - { - return $this->pending_rename_info; - } - - public function hasPendingRenameInfo() - { - return isset($this->pending_rename_info); - } - - public function clearPendingRenameInfo() - { - unset($this->pending_rename_info); - } - - /** - * Output only. Only present if the folder is part of an ongoing RenameFolder - * operation. Contains information which can be used to query the operation - * status. The presence of this field also indicates all write operations are - * blocked for this folder, including folder, managed folder, and object - * operations. - * - * Generated from protobuf field .google.storage.control.v2.PendingRenameInfo pending_rename_info = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Storage\Control\V2\PendingRenameInfo $var - * @return $this - */ - public function setPendingRenameInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\PendingRenameInfo::class); - $this->pending_rename_info = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetAnywhereCacheRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetAnywhereCacheRequest.php deleted file mode 100644 index 599d72537012..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetAnywhereCacheRequest.php +++ /dev/null @@ -1,124 +0,0 @@ -google.storage.control.v2.GetAnywhereCacheRequest - */ -class GetAnywhereCacheRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name field in the request should be: - * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $name Required. The name field in the request should be: - * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` - * Please see {@see StorageControlClient::anywhereCacheName()} for help formatting this field. - * - * @return \Google\Cloud\Storage\Control\V2\GetAnywhereCacheRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name field in the request should be: - * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` - * @type string $request_id - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name field in the request should be: - * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name field in the request should be: - * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetFolderIntelligenceConfigRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetFolderIntelligenceConfigRequest.php deleted file mode 100644 index b3e8456ca818..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetFolderIntelligenceConfigRequest.php +++ /dev/null @@ -1,97 +0,0 @@ -google.storage.control.v2.GetFolderIntelligenceConfigRequest - */ -class GetFolderIntelligenceConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the `IntelligenceConfig` resource associated with - * your folder. - * Format: `folders/{id}/locations/global/intelligenceConfig` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the `IntelligenceConfig` resource associated with - * your folder. - * - * Format: `folders/{id}/locations/global/intelligenceConfig` - * Please see {@see StorageControlClient::intelligenceConfigName()} for help formatting this field. - * - * @return \Google\Cloud\Storage\Control\V2\GetFolderIntelligenceConfigRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the `IntelligenceConfig` resource associated with - * your folder. - * Format: `folders/{id}/locations/global/intelligenceConfig` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the `IntelligenceConfig` resource associated with - * your folder. - * Format: `folders/{id}/locations/global/intelligenceConfig` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the `IntelligenceConfig` resource associated with - * your folder. - * Format: `folders/{id}/locations/global/intelligenceConfig` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetFolderRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetFolderRequest.php deleted file mode 100644 index 6ba954a244f2..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetFolderRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.storage.control.v2.GetFolderRequest - */ -class GetFolderRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the folder. - * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` - * - * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Makes the operation only succeed conditional on whether the folder's - * current metageneration matches the given value. - * - * Generated from protobuf field optional int64 if_metageneration_match = 3; - */ - protected $if_metageneration_match = null; - /** - * Makes the operation only succeed conditional on whether the folder's - * current metageneration does not match the given value. - * - * Generated from protobuf field optional int64 if_metageneration_not_match = 4; - */ - protected $if_metageneration_not_match = null; - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $name Required. Name of the folder. - * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` - * Please see {@see StorageControlClient::folderName()} for help formatting this field. - * - * @return \Google\Cloud\Storage\Control\V2\GetFolderRequest - * - * @experimental - */ - public static function 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 folder. - * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` - * @type int|string $if_metageneration_match - * Makes the operation only succeed conditional on whether the folder's - * current metageneration matches the given value. - * @type int|string $if_metageneration_not_match - * Makes the operation only succeed conditional on whether the folder's - * current metageneration does not match the given value. - * @type string $request_id - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the folder. - * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` - * - * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the folder. - * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` - * - * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Makes the operation only succeed conditional on whether the folder's - * current metageneration matches the given value. - * - * Generated from protobuf field optional int64 if_metageneration_match = 3; - * @return int|string - */ - public function getIfMetagenerationMatch() - { - return isset($this->if_metageneration_match) ? $this->if_metageneration_match : 0; - } - - public function hasIfMetagenerationMatch() - { - return isset($this->if_metageneration_match); - } - - public function clearIfMetagenerationMatch() - { - unset($this->if_metageneration_match); - } - - /** - * Makes the operation only succeed conditional on whether the folder's - * current metageneration matches the given value. - * - * Generated from protobuf field optional int64 if_metageneration_match = 3; - * @param int|string $var - * @return $this - */ - public function setIfMetagenerationMatch($var) - { - GPBUtil::checkInt64($var); - $this->if_metageneration_match = $var; - - return $this; - } - - /** - * Makes the operation only succeed conditional on whether the folder's - * current metageneration does not match the given value. - * - * Generated from protobuf field optional int64 if_metageneration_not_match = 4; - * @return int|string - */ - public function getIfMetagenerationNotMatch() - { - return isset($this->if_metageneration_not_match) ? $this->if_metageneration_not_match : 0; - } - - public function hasIfMetagenerationNotMatch() - { - return isset($this->if_metageneration_not_match); - } - - public function clearIfMetagenerationNotMatch() - { - unset($this->if_metageneration_not_match); - } - - /** - * Makes the operation only succeed conditional on whether the folder's - * current metageneration does not match the given value. - * - * Generated from protobuf field optional int64 if_metageneration_not_match = 4; - * @param int|string $var - * @return $this - */ - public function setIfMetagenerationNotMatch($var) - { - GPBUtil::checkInt64($var); - $this->if_metageneration_not_match = $var; - - return $this; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetManagedFolderRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetManagedFolderRequest.php deleted file mode 100644 index b4deee313827..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetManagedFolderRequest.php +++ /dev/null @@ -1,225 +0,0 @@ -google.storage.control.v2.GetManagedFolderRequest - */ -class GetManagedFolderRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the managed folder. - * Format: - * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` - * - * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The operation succeeds conditional on the managed folder's current - * metageneration matching the value here specified. - * - * Generated from protobuf field optional int64 if_metageneration_match = 3; - */ - protected $if_metageneration_match = null; - /** - * The operation succeeds conditional on the managed folder's current - * metageneration NOT matching the value here specified. - * - * Generated from protobuf field optional int64 if_metageneration_not_match = 4; - */ - protected $if_metageneration_not_match = null; - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $name Required. Name of the managed folder. - * Format: - * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` - * Please see {@see StorageControlClient::managedFolderName()} for help formatting this field. - * - * @return \Google\Cloud\Storage\Control\V2\GetManagedFolderRequest - * - * @experimental - */ - public static function 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 managed folder. - * Format: - * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` - * @type int|string $if_metageneration_match - * The operation succeeds conditional on the managed folder's current - * metageneration matching the value here specified. - * @type int|string $if_metageneration_not_match - * The operation succeeds conditional on the managed folder's current - * metageneration NOT matching the value here specified. - * @type string $request_id - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the managed folder. - * Format: - * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` - * - * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the managed folder. - * Format: - * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` - * - * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The operation succeeds conditional on the managed folder's current - * metageneration matching the value here specified. - * - * Generated from protobuf field optional int64 if_metageneration_match = 3; - * @return int|string - */ - public function getIfMetagenerationMatch() - { - return isset($this->if_metageneration_match) ? $this->if_metageneration_match : 0; - } - - public function hasIfMetagenerationMatch() - { - return isset($this->if_metageneration_match); - } - - public function clearIfMetagenerationMatch() - { - unset($this->if_metageneration_match); - } - - /** - * The operation succeeds conditional on the managed folder's current - * metageneration matching the value here specified. - * - * Generated from protobuf field optional int64 if_metageneration_match = 3; - * @param int|string $var - * @return $this - */ - public function setIfMetagenerationMatch($var) - { - GPBUtil::checkInt64($var); - $this->if_metageneration_match = $var; - - return $this; - } - - /** - * The operation succeeds conditional on the managed folder's current - * metageneration NOT matching the value here specified. - * - * Generated from protobuf field optional int64 if_metageneration_not_match = 4; - * @return int|string - */ - public function getIfMetagenerationNotMatch() - { - return isset($this->if_metageneration_not_match) ? $this->if_metageneration_not_match : 0; - } - - public function hasIfMetagenerationNotMatch() - { - return isset($this->if_metageneration_not_match); - } - - public function clearIfMetagenerationNotMatch() - { - unset($this->if_metageneration_not_match); - } - - /** - * The operation succeeds conditional on the managed folder's current - * metageneration NOT matching the value here specified. - * - * Generated from protobuf field optional int64 if_metageneration_not_match = 4; - * @param int|string $var - * @return $this - */ - public function setIfMetagenerationNotMatch($var) - { - GPBUtil::checkInt64($var); - $this->if_metageneration_not_match = $var; - - return $this; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetOrganizationIntelligenceConfigRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetOrganizationIntelligenceConfigRequest.php deleted file mode 100644 index 6b28f9803e05..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetOrganizationIntelligenceConfigRequest.php +++ /dev/null @@ -1,97 +0,0 @@ -google.storage.control.v2.GetOrganizationIntelligenceConfigRequest - */ -class GetOrganizationIntelligenceConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the `IntelligenceConfig` resource associated with - * your organization. - * Format: `organizations/{org_id}/locations/global/intelligenceConfig` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the `IntelligenceConfig` resource associated with - * your organization. - * - * Format: `organizations/{org_id}/locations/global/intelligenceConfig` - * Please see {@see StorageControlClient::intelligenceConfigName()} for help formatting this field. - * - * @return \Google\Cloud\Storage\Control\V2\GetOrganizationIntelligenceConfigRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the `IntelligenceConfig` resource associated with - * your organization. - * Format: `organizations/{org_id}/locations/global/intelligenceConfig` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the `IntelligenceConfig` resource associated with - * your organization. - * Format: `organizations/{org_id}/locations/global/intelligenceConfig` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the `IntelligenceConfig` resource associated with - * your organization. - * Format: `organizations/{org_id}/locations/global/intelligenceConfig` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetProjectIntelligenceConfigRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetProjectIntelligenceConfigRequest.php deleted file mode 100644 index bad00321de29..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetProjectIntelligenceConfigRequest.php +++ /dev/null @@ -1,97 +0,0 @@ -google.storage.control.v2.GetProjectIntelligenceConfigRequest - */ -class GetProjectIntelligenceConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the `IntelligenceConfig` resource associated with - * your project. - * Format: `projects/{id}/locations/global/intelligenceConfig` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the `IntelligenceConfig` resource associated with - * your project. - * - * Format: `projects/{id}/locations/global/intelligenceConfig` - * Please see {@see StorageControlClient::intelligenceConfigName()} for help formatting this field. - * - * @return \Google\Cloud\Storage\Control\V2\GetProjectIntelligenceConfigRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the `IntelligenceConfig` resource associated with - * your project. - * Format: `projects/{id}/locations/global/intelligenceConfig` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the `IntelligenceConfig` resource associated with - * your project. - * Format: `projects/{id}/locations/global/intelligenceConfig` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the `IntelligenceConfig` resource associated with - * your project. - * Format: `projects/{id}/locations/global/intelligenceConfig` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetStorageLayoutRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetStorageLayoutRequest.php deleted file mode 100644 index ca2429d9ac1f..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/GetStorageLayoutRequest.php +++ /dev/null @@ -1,162 +0,0 @@ -google.storage.control.v2.GetStorageLayoutRequest - */ -class GetStorageLayoutRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the StorageLayout resource. - * Format: `projects/{project}/buckets/{bucket}/storageLayout` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * An optional prefix used for permission check. It is useful when the caller - * only has limited permissions under a specific prefix. - * - * Generated from protobuf field string prefix = 2; - */ - protected $prefix = ''; - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $name Required. The name of the StorageLayout resource. - * Format: `projects/{project}/buckets/{bucket}/storageLayout` - * Please see {@see StorageControlClient::storageLayoutName()} for help formatting this field. - * - * @return \Google\Cloud\Storage\Control\V2\GetStorageLayoutRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the StorageLayout resource. - * Format: `projects/{project}/buckets/{bucket}/storageLayout` - * @type string $prefix - * An optional prefix used for permission check. It is useful when the caller - * only has limited permissions under a specific prefix. - * @type string $request_id - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the StorageLayout resource. - * Format: `projects/{project}/buckets/{bucket}/storageLayout` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the StorageLayout resource. - * Format: `projects/{project}/buckets/{bucket}/storageLayout` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * An optional prefix used for permission check. It is useful when the caller - * only has limited permissions under a specific prefix. - * - * Generated from protobuf field string prefix = 2; - * @return string - */ - public function getPrefix() - { - return $this->prefix; - } - - /** - * An optional prefix used for permission check. It is useful when the caller - * only has limited permissions under a specific prefix. - * - * Generated from protobuf field string prefix = 2; - * @param string $var - * @return $this - */ - public function setPrefix($var) - { - GPBUtil::checkString($var, True); - $this->prefix = $var; - - return $this; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig.php deleted file mode 100644 index 2ccf8f12cc0b..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig.php +++ /dev/null @@ -1,314 +0,0 @@ -google.storage.control.v2.IntelligenceConfig - */ -class IntelligenceConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The name of the `IntelligenceConfig` resource associated with - * your organization, folder, or project. - * The name format varies based on the GCP resource hierarchy as follows: - * * For project: - * `projects/{project_number}/locations/global/intelligenceConfig` - * * For organization: - * `organizations/{org_id}/locations/global/intelligenceConfig` - * * For folder: `folders/{folder_id}/locations/global/intelligenceConfig` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Optional. The edition configuration of the `IntelligenceConfig` resource. - * - * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.EditionConfig edition_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $edition_config = 0; - /** - * Output only. The time at which the `IntelligenceConfig` resource is last - * updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. Filter over location and bucket. - * - * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.Filter filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = null; - /** - * Output only. The `IntelligenceConfig` resource that is applicable for the - * resource. - * - * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig effective_intelligence_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $effective_intelligence_config = null; - /** - * The trial configuration of the `IntelligenceConfig` resource. - * - * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.TrialConfig trial_config = 7; - */ - protected $trial_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The name of the `IntelligenceConfig` resource associated with - * your organization, folder, or project. - * The name format varies based on the GCP resource hierarchy as follows: - * * For project: - * `projects/{project_number}/locations/global/intelligenceConfig` - * * For organization: - * `organizations/{org_id}/locations/global/intelligenceConfig` - * * For folder: `folders/{folder_id}/locations/global/intelligenceConfig` - * @type int $edition_config - * Optional. The edition configuration of the `IntelligenceConfig` resource. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time at which the `IntelligenceConfig` resource is last - * updated. - * @type \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter $filter - * Optional. Filter over location and bucket. - * @type \Google\Cloud\Storage\Control\V2\IntelligenceConfig\EffectiveIntelligenceConfig $effective_intelligence_config - * Output only. The `IntelligenceConfig` resource that is applicable for the - * resource. - * @type \Google\Cloud\Storage\Control\V2\IntelligenceConfig\TrialConfig $trial_config - * The trial configuration of the `IntelligenceConfig` resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The name of the `IntelligenceConfig` resource associated with - * your organization, folder, or project. - * The name format varies based on the GCP resource hierarchy as follows: - * * For project: - * `projects/{project_number}/locations/global/intelligenceConfig` - * * For organization: - * `organizations/{org_id}/locations/global/intelligenceConfig` - * * For folder: `folders/{folder_id}/locations/global/intelligenceConfig` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The name of the `IntelligenceConfig` resource associated with - * your organization, folder, or project. - * The name format varies based on the GCP resource hierarchy as follows: - * * For project: - * `projects/{project_number}/locations/global/intelligenceConfig` - * * For organization: - * `organizations/{org_id}/locations/global/intelligenceConfig` - * * For folder: `folders/{folder_id}/locations/global/intelligenceConfig` - * - * 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 edition configuration of the `IntelligenceConfig` resource. - * - * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.EditionConfig edition_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getEditionConfig() - { - return $this->edition_config; - } - - /** - * Optional. The edition configuration of the `IntelligenceConfig` resource. - * - * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.EditionConfig edition_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setEditionConfig($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Storage\Control\V2\IntelligenceConfig\EditionConfig::class); - $this->edition_config = $var; - - return $this; - } - - /** - * Output only. The time at which the `IntelligenceConfig` resource is last - * updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time at which the `IntelligenceConfig` resource is last - * updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional. Filter over location and bucket. - * - * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.Filter filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter|null - */ - public function getFilter() - { - return $this->filter; - } - - public function hasFilter() - { - return isset($this->filter); - } - - public function clearFilter() - { - unset($this->filter); - } - - /** - * Optional. Filter over location and bucket. - * - * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.Filter filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter::class); - $this->filter = $var; - - return $this; - } - - /** - * Output only. The `IntelligenceConfig` resource that is applicable for the - * resource. - * - * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig effective_intelligence_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Storage\Control\V2\IntelligenceConfig\EffectiveIntelligenceConfig|null - */ - public function getEffectiveIntelligenceConfig() - { - return $this->effective_intelligence_config; - } - - public function hasEffectiveIntelligenceConfig() - { - return isset($this->effective_intelligence_config); - } - - public function clearEffectiveIntelligenceConfig() - { - unset($this->effective_intelligence_config); - } - - /** - * Output only. The `IntelligenceConfig` resource that is applicable for the - * resource. - * - * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig effective_intelligence_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Storage\Control\V2\IntelligenceConfig\EffectiveIntelligenceConfig $var - * @return $this - */ - public function setEffectiveIntelligenceConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\IntelligenceConfig\EffectiveIntelligenceConfig::class); - $this->effective_intelligence_config = $var; - - return $this; - } - - /** - * The trial configuration of the `IntelligenceConfig` resource. - * - * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.TrialConfig trial_config = 7; - * @return \Google\Cloud\Storage\Control\V2\IntelligenceConfig\TrialConfig|null - */ - public function getTrialConfig() - { - return $this->trial_config; - } - - public function hasTrialConfig() - { - return isset($this->trial_config); - } - - public function clearTrialConfig() - { - unset($this->trial_config); - } - - /** - * The trial configuration of the `IntelligenceConfig` resource. - * - * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.TrialConfig trial_config = 7; - * @param \Google\Cloud\Storage\Control\V2\IntelligenceConfig\TrialConfig $var - * @return $this - */ - public function setTrialConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\IntelligenceConfig\TrialConfig::class); - $this->trial_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/EditionConfig.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/EditionConfig.php deleted file mode 100644 index 447e5b18fa95..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/EditionConfig.php +++ /dev/null @@ -1,88 +0,0 @@ -google.storage.control.v2.IntelligenceConfig.EditionConfig - */ -class EditionConfig -{ - /** - * This is an unknown edition of the resource. - * - * Generated from protobuf enum EDITION_CONFIG_UNSPECIFIED = 0; - */ - const EDITION_CONFIG_UNSPECIFIED = 0; - /** - * The inherited edition from the parent and filters. This is the default - * edition when there is no `IntelligenceConfig` setup for a GCP resource. - * - * Generated from protobuf enum INHERIT = 1; - */ - const INHERIT = 1; - /** - * The edition configuration is disabled for the `IntelligenceConfig` - * resource and its children. Filters are not applicable. - * - * Generated from protobuf enum DISABLED = 2; - */ - const DISABLED = 2; - /** - * The `IntelligenceConfig` resource is of STANDARD edition. - * - * Generated from protobuf enum STANDARD = 3; - */ - const STANDARD = 3; - /** - * The `IntelligenceConfig` resource is available in `TRIAL` edition. During - * the trial period, Cloud Storage does not charge for Storage Intelligence - * usage. You can specify the buckets to include in the trial period by - * using filters. At the end of the trial period, the `IntelligenceConfig` - * resource is upgraded to `STANDARD` edition. - * - * Generated from protobuf enum TRIAL = 5; - */ - const TRIAL = 5; - - private static $valueToName = [ - self::EDITION_CONFIG_UNSPECIFIED => 'EDITION_CONFIG_UNSPECIFIED', - self::INHERIT => 'INHERIT', - self::DISABLED => 'DISABLED', - self::STANDARD => 'STANDARD', - self::TRIAL => 'TRIAL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EditionConfig::class, \Google\Cloud\Storage\Control\V2\IntelligenceConfig_EditionConfig::class); - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/EffectiveIntelligenceConfig.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/EffectiveIntelligenceConfig.php deleted file mode 100644 index 819cea0bf40b..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/EffectiveIntelligenceConfig.php +++ /dev/null @@ -1,116 +0,0 @@ -google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig - */ -class EffectiveIntelligenceConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The `IntelligenceConfig` edition that is applicable for the - * resource. - * - * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig.EffectiveEdition effective_edition = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $effective_edition = 0; - /** - * Output only. The `IntelligenceConfig` resource that is applied for the - * target resource. Format: - * `{organizations|folders|projects}/{id}/locations/{location}/intelligenceConfig` - * - * Generated from protobuf field string intelligence_config = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $intelligence_config = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $effective_edition - * Output only. The `IntelligenceConfig` edition that is applicable for the - * resource. - * @type string $intelligence_config - * Output only. The `IntelligenceConfig` resource that is applied for the - * target resource. Format: - * `{organizations|folders|projects}/{id}/locations/{location}/intelligenceConfig` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The `IntelligenceConfig` edition that is applicable for the - * resource. - * - * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig.EffectiveEdition effective_edition = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getEffectiveEdition() - { - return $this->effective_edition; - } - - /** - * Output only. The `IntelligenceConfig` edition that is applicable for the - * resource. - * - * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig.EffectiveEdition effective_edition = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setEffectiveEdition($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Storage\Control\V2\IntelligenceConfig\EffectiveIntelligenceConfig\EffectiveEdition::class); - $this->effective_edition = $var; - - return $this; - } - - /** - * Output only. The `IntelligenceConfig` resource that is applied for the - * target resource. Format: - * `{organizations|folders|projects}/{id}/locations/{location}/intelligenceConfig` - * - * Generated from protobuf field string intelligence_config = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getIntelligenceConfig() - { - return $this->intelligence_config; - } - - /** - * Output only. The `IntelligenceConfig` resource that is applied for the - * target resource. Format: - * `{organizations|folders|projects}/{id}/locations/{location}/intelligenceConfig` - * - * Generated from protobuf field string intelligence_config = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setIntelligenceConfig($var) - { - GPBUtil::checkString($var, True); - $this->intelligence_config = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EffectiveIntelligenceConfig::class, \Google\Cloud\Storage\Control\V2\IntelligenceConfig_EffectiveIntelligenceConfig::class); - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/EffectiveIntelligenceConfig/EffectiveEdition.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/EffectiveIntelligenceConfig/EffectiveEdition.php deleted file mode 100644 index 914d2214f4e3..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/EffectiveIntelligenceConfig/EffectiveEdition.php +++ /dev/null @@ -1,64 +0,0 @@ -google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig.EffectiveEdition - */ -class EffectiveEdition -{ - /** - * This is an unknown edition of the resource. - * - * Generated from protobuf enum EFFECTIVE_EDITION_UNSPECIFIED = 0; - */ - const EFFECTIVE_EDITION_UNSPECIFIED = 0; - /** - * No edition. - * - * Generated from protobuf enum NONE = 1; - */ - const NONE = 1; - /** - * The `IntelligenceConfig` resource is of STANDARD edition. - * - * Generated from protobuf enum STANDARD = 2; - */ - const STANDARD = 2; - - private static $valueToName = [ - self::EFFECTIVE_EDITION_UNSPECIFIED => 'EFFECTIVE_EDITION_UNSPECIFIED', - self::NONE => 'NONE', - self::STANDARD => 'STANDARD', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EffectiveEdition::class, \Google\Cloud\Storage\Control\V2\IntelligenceConfig_EffectiveIntelligenceConfig_EffectiveEdition::class); - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/Filter.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/Filter.php deleted file mode 100644 index e55bcb81f2af..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/Filter.php +++ /dev/null @@ -1,188 +0,0 @@ -google.storage.control.v2.IntelligenceConfig.Filter - */ -class Filter extends \Google\Protobuf\Internal\Message -{ - protected $cloud_storage_locations; - protected $cloud_storage_buckets; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter\CloudStorageLocations $included_cloud_storage_locations - * Bucket locations to include. - * @type \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter\CloudStorageLocations $excluded_cloud_storage_locations - * Bucket locations to exclude. - * @type \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter\CloudStorageBuckets $included_cloud_storage_buckets - * Buckets to include. - * @type \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter\CloudStorageBuckets $excluded_cloud_storage_buckets - * Buckets to exclude. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Bucket locations to include. - * - * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations included_cloud_storage_locations = 1; - * @return \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter\CloudStorageLocations|null - */ - public function getIncludedCloudStorageLocations() - { - return $this->readOneof(1); - } - - public function hasIncludedCloudStorageLocations() - { - return $this->hasOneof(1); - } - - /** - * Bucket locations to include. - * - * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations included_cloud_storage_locations = 1; - * @param \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter\CloudStorageLocations $var - * @return $this - */ - public function setIncludedCloudStorageLocations($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter\CloudStorageLocations::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Bucket locations to exclude. - * - * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations excluded_cloud_storage_locations = 2; - * @return \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter\CloudStorageLocations|null - */ - public function getExcludedCloudStorageLocations() - { - return $this->readOneof(2); - } - - public function hasExcludedCloudStorageLocations() - { - return $this->hasOneof(2); - } - - /** - * Bucket locations to exclude. - * - * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations excluded_cloud_storage_locations = 2; - * @param \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter\CloudStorageLocations $var - * @return $this - */ - public function setExcludedCloudStorageLocations($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter\CloudStorageLocations::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Buckets to include. - * - * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets included_cloud_storage_buckets = 3; - * @return \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter\CloudStorageBuckets|null - */ - public function getIncludedCloudStorageBuckets() - { - return $this->readOneof(3); - } - - public function hasIncludedCloudStorageBuckets() - { - return $this->hasOneof(3); - } - - /** - * Buckets to include. - * - * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets included_cloud_storage_buckets = 3; - * @param \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter\CloudStorageBuckets $var - * @return $this - */ - public function setIncludedCloudStorageBuckets($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter\CloudStorageBuckets::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Buckets to exclude. - * - * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets excluded_cloud_storage_buckets = 4; - * @return \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter\CloudStorageBuckets|null - */ - public function getExcludedCloudStorageBuckets() - { - return $this->readOneof(4); - } - - public function hasExcludedCloudStorageBuckets() - { - return $this->hasOneof(4); - } - - /** - * Buckets to exclude. - * - * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets excluded_cloud_storage_buckets = 4; - * @param \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter\CloudStorageBuckets $var - * @return $this - */ - public function setExcludedCloudStorageBuckets($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\IntelligenceConfig\Filter\CloudStorageBuckets::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getCloudStorageLocations() - { - return $this->whichOneof("cloud_storage_locations"); - } - - /** - * @return string - */ - public function getCloudStorageBuckets() - { - return $this->whichOneof("cloud_storage_buckets"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Filter::class, \Google\Cloud\Storage\Control\V2\IntelligenceConfig_Filter::class); - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/Filter/CloudStorageBuckets.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/Filter/CloudStorageBuckets.php deleted file mode 100644 index 2c13e22af394..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/Filter/CloudStorageBuckets.php +++ /dev/null @@ -1,98 +0,0 @@ -google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets - */ -class CloudStorageBuckets extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. A regex pattern for matching bucket names. Regex should - * follow the syntax specified in - * [google/re2](https://github.com/google/re2). For example, - * `^sample_.*` matches all buckets of the form - * `gs://sample_bucket-1`, `gs://sample_bucket-2`, - * `gs://sample_bucket-n` but not `gs://test_sample_bucket`. - * If you want to match a single bucket, say `gs://sample_bucket`, - * use `sample_bucket`. - * - * Generated from protobuf field repeated string bucket_id_regexes = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $bucket_id_regexes; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $bucket_id_regexes - * Optional. A regex pattern for matching bucket names. Regex should - * follow the syntax specified in - * [google/re2](https://github.com/google/re2). For example, - * `^sample_.*` matches all buckets of the form - * `gs://sample_bucket-1`, `gs://sample_bucket-2`, - * `gs://sample_bucket-n` but not `gs://test_sample_bucket`. - * If you want to match a single bucket, say `gs://sample_bucket`, - * use `sample_bucket`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Optional. A regex pattern for matching bucket names. Regex should - * follow the syntax specified in - * [google/re2](https://github.com/google/re2). For example, - * `^sample_.*` matches all buckets of the form - * `gs://sample_bucket-1`, `gs://sample_bucket-2`, - * `gs://sample_bucket-n` but not `gs://test_sample_bucket`. - * If you want to match a single bucket, say `gs://sample_bucket`, - * use `sample_bucket`. - * - * Generated from protobuf field repeated string bucket_id_regexes = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBucketIdRegexes() - { - return $this->bucket_id_regexes; - } - - /** - * Optional. A regex pattern for matching bucket names. Regex should - * follow the syntax specified in - * [google/re2](https://github.com/google/re2). For example, - * `^sample_.*` matches all buckets of the form - * `gs://sample_bucket-1`, `gs://sample_bucket-2`, - * `gs://sample_bucket-n` but not `gs://test_sample_bucket`. - * If you want to match a single bucket, say `gs://sample_bucket`, - * use `sample_bucket`. - * - * Generated from protobuf field repeated string bucket_id_regexes = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBucketIdRegexes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->bucket_id_regexes = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CloudStorageBuckets::class, \Google\Cloud\Storage\Control\V2\IntelligenceConfig_Filter_CloudStorageBuckets::class); - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/Filter/CloudStorageLocations.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/Filter/CloudStorageLocations.php deleted file mode 100644 index 0f1ac219c845..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/Filter/CloudStorageLocations.php +++ /dev/null @@ -1,78 +0,0 @@ -google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations - */ -class CloudStorageLocations extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Bucket locations. Location can be any of the Cloud Storage - * regions specified in lower case format. For example, `us-east1`, - * `us-west1`. - * - * Generated from protobuf field repeated string locations = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $locations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $locations - * Optional. Bucket locations. Location can be any of the Cloud Storage - * regions specified in lower case format. For example, `us-east1`, - * `us-west1`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Bucket locations. Location can be any of the Cloud Storage - * regions specified in lower case format. For example, `us-east1`, - * `us-west1`. - * - * Generated from protobuf field repeated string locations = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLocations() - { - return $this->locations; - } - - /** - * Optional. Bucket locations. Location can be any of the Cloud Storage - * regions specified in lower case format. For example, `us-east1`, - * `us-west1`. - * - * Generated from protobuf field repeated string locations = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->locations = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CloudStorageLocations::class, \Google\Cloud\Storage\Control\V2\IntelligenceConfig_Filter_CloudStorageLocations::class); - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/TrialConfig.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/TrialConfig.php deleted file mode 100644 index 25e7bdf56716..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/IntelligenceConfig/TrialConfig.php +++ /dev/null @@ -1,80 +0,0 @@ -google.storage.control.v2.IntelligenceConfig.TrialConfig - */ -class TrialConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time at which the trial expires. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $expire_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $expire_time - * Output only. The time at which the trial expires. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time at which the trial expires. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpireTime() - { - return $this->expire_time; - } - - public function hasExpireTime() - { - return isset($this->expire_time); - } - - public function clearExpireTime() - { - unset($this->expire_time); - } - - /** - * Output only. The time at which the trial expires. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expire_time = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TrialConfig::class, \Google\Cloud\Storage\Control\V2\IntelligenceConfig_TrialConfig::class); - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListAnywhereCachesRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListAnywhereCachesRequest.php deleted file mode 100644 index f845cffc7d9a..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListAnywhereCachesRequest.php +++ /dev/null @@ -1,195 +0,0 @@ -google.storage.control.v2.ListAnywhereCachesRequest - */ -class ListAnywhereCachesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The bucket to which this cache belongs. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of caches to return in a single response. - * The service will use this parameter or 1,000 items, whichever is smaller. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A previously-returned page token representing part of the larger set of - * results to view. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The bucket to which this cache belongs. Please see - * {@see StorageControlClient::bucketName()} for help formatting this field. - * - * @return \Google\Cloud\Storage\Control\V2\ListAnywhereCachesRequest - * - * @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 bucket to which this cache belongs. - * @type int $page_size - * Maximum number of caches to return in a single response. - * The service will use this parameter or 1,000 items, whichever is smaller. - * @type string $page_token - * A previously-returned page token representing part of the larger set of - * results to view. - * @type string $request_id - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. The bucket to which this cache belongs. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The bucket to which this cache belongs. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Maximum number of caches to return in a single response. - * The service will use this parameter or 1,000 items, whichever is smaller. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of caches to return in a single response. - * The service will use this parameter or 1,000 items, whichever is smaller. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A previously-returned page token representing part of the larger set of - * results to view. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A previously-returned page token representing part of the larger set of - * results to view. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * 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. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListAnywhereCachesResponse.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListAnywhereCachesResponse.php deleted file mode 100644 index 79115e5d5a33..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListAnywhereCachesResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.storage.control.v2.ListAnywhereCachesResponse - */ -class ListAnywhereCachesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of items. - * - * Generated from protobuf field repeated .google.storage.control.v2.AnywhereCache anywhere_caches = 1; - */ - private $anywhere_caches; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Storage\Control\V2\AnywhereCache>|\Google\Protobuf\Internal\RepeatedField $anywhere_caches - * The list of items. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * The list of items. - * - * Generated from protobuf field repeated .google.storage.control.v2.AnywhereCache anywhere_caches = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAnywhereCaches() - { - return $this->anywhere_caches; - } - - /** - * The list of items. - * - * Generated from protobuf field repeated .google.storage.control.v2.AnywhereCache anywhere_caches = 1; - * @param array<\Google\Cloud\Storage\Control\V2\AnywhereCache>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAnywhereCaches($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Storage\Control\V2\AnywhereCache::class); - $this->anywhere_caches = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListFoldersRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListFoldersRequest.php deleted file mode 100644 index 9f009d6463c2..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListFoldersRequest.php +++ /dev/null @@ -1,373 +0,0 @@ -google.storage.control.v2.ListFoldersRequest - */ -class ListFoldersRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the bucket in which to look for folders. The bucket must - * be a hierarchical namespace enabled bucket. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of folders to return in a single response. The - * service will use this parameter or 1,000 items, whichever is smaller. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A previously-returned page token representing part of the larger - * set of results to view. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Filter results to folders whose names begin with this prefix. - * If set, the value must either be an empty string or end with a '/'. - * - * Generated from protobuf field string prefix = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $prefix = ''; - /** - * Optional. If set, returns results in a directory-like mode. The results - * will only include folders that either exactly match the above prefix, or - * are one level below the prefix. The only supported value is '/'. - * - * Generated from protobuf field string delimiter = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $delimiter = ''; - /** - * Optional. Filter results to folders whose names are lexicographically equal - * to or after lexicographic_start. If lexicographic_end is also set, the - * folders listed have names between lexicographic_start (inclusive) and - * lexicographic_end (exclusive). - * - * Generated from protobuf field string lexicographic_start = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $lexicographic_start = ''; - /** - * Optional. Filter results to folders whose names are lexicographically - * before lexicographic_end. If lexicographic_start is also set, the folders - * listed have names between lexicographic_start (inclusive) and - * lexicographic_end (exclusive). - * - * Generated from protobuf field string lexicographic_end = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $lexicographic_end = ''; - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $parent Required. Name of the bucket in which to look for folders. The bucket must - * be a hierarchical namespace enabled bucket. Please see - * {@see StorageControlClient::bucketName()} for help formatting this field. - * - * @return \Google\Cloud\Storage\Control\V2\ListFoldersRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Name of the bucket in which to look for folders. The bucket must - * be a hierarchical namespace enabled bucket. - * @type int $page_size - * Optional. Maximum number of folders to return in a single response. The - * service will use this parameter or 1,000 items, whichever is smaller. - * @type string $page_token - * Optional. A previously-returned page token representing part of the larger - * set of results to view. - * @type string $prefix - * Optional. Filter results to folders whose names begin with this prefix. - * If set, the value must either be an empty string or end with a '/'. - * @type string $delimiter - * Optional. If set, returns results in a directory-like mode. The results - * will only include folders that either exactly match the above prefix, or - * are one level below the prefix. The only supported value is '/'. - * @type string $lexicographic_start - * Optional. Filter results to folders whose names are lexicographically equal - * to or after lexicographic_start. If lexicographic_end is also set, the - * folders listed have names between lexicographic_start (inclusive) and - * lexicographic_end (exclusive). - * @type string $lexicographic_end - * Optional. Filter results to folders whose names are lexicographically - * before lexicographic_end. If lexicographic_start is also set, the folders - * listed have names between lexicographic_start (inclusive) and - * lexicographic_end (exclusive). - * @type string $request_id - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the bucket in which to look for folders. The bucket must - * be a hierarchical namespace enabled bucket. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Name of the bucket in which to look for folders. The bucket must - * be a hierarchical namespace enabled bucket. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Maximum number of folders to return in a single response. The - * service will use this parameter or 1,000 items, whichever is smaller. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Maximum number of folders to return in a single response. The - * service will use this parameter or 1,000 items, whichever is smaller. - * - * 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 previously-returned page token representing part of the larger - * set of results to view. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A previously-returned page token representing part of the larger - * set of results to view. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. Filter results to folders whose names begin with this prefix. - * If set, the value must either be an empty string or end with a '/'. - * - * Generated from protobuf field string prefix = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPrefix() - { - return $this->prefix; - } - - /** - * Optional. Filter results to folders whose names begin with this prefix. - * If set, the value must either be an empty string or end with a '/'. - * - * Generated from protobuf field string prefix = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPrefix($var) - { - GPBUtil::checkString($var, True); - $this->prefix = $var; - - return $this; - } - - /** - * Optional. If set, returns results in a directory-like mode. The results - * will only include folders that either exactly match the above prefix, or - * are one level below the prefix. The only supported value is '/'. - * - * Generated from protobuf field string delimiter = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDelimiter() - { - return $this->delimiter; - } - - /** - * Optional. If set, returns results in a directory-like mode. The results - * will only include folders that either exactly match the above prefix, or - * are one level below the prefix. The only supported value is '/'. - * - * Generated from protobuf field string delimiter = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDelimiter($var) - { - GPBUtil::checkString($var, True); - $this->delimiter = $var; - - return $this; - } - - /** - * Optional. Filter results to folders whose names are lexicographically equal - * to or after lexicographic_start. If lexicographic_end is also set, the - * folders listed have names between lexicographic_start (inclusive) and - * lexicographic_end (exclusive). - * - * Generated from protobuf field string lexicographic_start = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getLexicographicStart() - { - return $this->lexicographic_start; - } - - /** - * Optional. Filter results to folders whose names are lexicographically equal - * to or after lexicographic_start. If lexicographic_end is also set, the - * folders listed have names between lexicographic_start (inclusive) and - * lexicographic_end (exclusive). - * - * Generated from protobuf field string lexicographic_start = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setLexicographicStart($var) - { - GPBUtil::checkString($var, True); - $this->lexicographic_start = $var; - - return $this; - } - - /** - * Optional. Filter results to folders whose names are lexicographically - * before lexicographic_end. If lexicographic_start is also set, the folders - * listed have names between lexicographic_start (inclusive) and - * lexicographic_end (exclusive). - * - * Generated from protobuf field string lexicographic_end = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getLexicographicEnd() - { - return $this->lexicographic_end; - } - - /** - * Optional. Filter results to folders whose names are lexicographically - * before lexicographic_end. If lexicographic_start is also set, the folders - * listed have names between lexicographic_start (inclusive) and - * lexicographic_end (exclusive). - * - * Generated from protobuf field string lexicographic_end = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setLexicographicEnd($var) - { - GPBUtil::checkString($var, True); - $this->lexicographic_end = $var; - - return $this; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListFoldersResponse.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListFoldersResponse.php deleted file mode 100644 index eb67af3ca9e8..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListFoldersResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.storage.control.v2.ListFoldersResponse - */ -class ListFoldersResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of child folders - * - * Generated from protobuf field repeated .google.storage.control.v2.Folder folders = 1; - */ - private $folders; - /** - * The continuation token, used to page through large result sets. Provide - * this value in a subsequent request to return the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Storage\Control\V2\Folder>|\Google\Protobuf\Internal\RepeatedField $folders - * The list of child folders - * @type string $next_page_token - * The continuation token, used to page through large result sets. Provide - * this value in a subsequent request to return the next page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * The list of child folders - * - * Generated from protobuf field repeated .google.storage.control.v2.Folder folders = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFolders() - { - return $this->folders; - } - - /** - * The list of child folders - * - * Generated from protobuf field repeated .google.storage.control.v2.Folder folders = 1; - * @param array<\Google\Cloud\Storage\Control\V2\Folder>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFolders($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Storage\Control\V2\Folder::class); - $this->folders = $arr; - - return $this; - } - - /** - * The continuation token, used to page through large result sets. Provide - * this value in a subsequent request to return the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The continuation token, used to page through large result sets. Provide - * this value in a subsequent request to return the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListManagedFoldersRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListManagedFoldersRequest.php deleted file mode 100644 index 4af92f638e5a..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListManagedFoldersRequest.php +++ /dev/null @@ -1,233 +0,0 @@ -google.storage.control.v2.ListManagedFoldersRequest - */ -class ListManagedFoldersRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the bucket this managed folder belongs to. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum number of managed folders to return in a single response. - * The service will use this parameter or 1,000 items, whichever is smaller. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A previously-returned page token representing part of the larger - * set of results to view. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Filter results to match managed folders with name starting with - * this prefix. - * - * Generated from protobuf field string prefix = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $prefix = ''; - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $parent Required. Name of the bucket this managed folder belongs to. Please see - * {@see StorageControlClient::bucketName()} for help formatting this field. - * - * @return \Google\Cloud\Storage\Control\V2\ListManagedFoldersRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Name of the bucket this managed folder belongs to. - * @type int $page_size - * Optional. Maximum number of managed folders to return in a single response. - * The service will use this parameter or 1,000 items, whichever is smaller. - * @type string $page_token - * Optional. A previously-returned page token representing part of the larger - * set of results to view. - * @type string $prefix - * Optional. Filter results to match managed folders with name starting with - * this prefix. - * @type string $request_id - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the bucket this managed folder belongs to. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Name of the bucket this managed folder belongs to. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Maximum number of managed folders to return in a single response. - * The service will use this parameter or 1,000 items, whichever is smaller. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Maximum number of managed folders to return in a single response. - * The service will use this parameter or 1,000 items, whichever is smaller. - * - * 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 previously-returned page token representing part of the larger - * set of results to view. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A previously-returned page token representing part of the larger - * set of results to view. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. Filter results to match managed folders with name starting with - * this prefix. - * - * Generated from protobuf field string prefix = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPrefix() - { - return $this->prefix; - } - - /** - * Optional. Filter results to match managed folders with name starting with - * this prefix. - * - * Generated from protobuf field string prefix = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPrefix($var) - { - GPBUtil::checkString($var, True); - $this->prefix = $var; - - return $this; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. - * - * Generated from protobuf field string request_id = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListManagedFoldersResponse.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListManagedFoldersResponse.php deleted file mode 100644 index 7ca7daea2e9c..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ListManagedFoldersResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.storage.control.v2.ListManagedFoldersResponse - */ -class ListManagedFoldersResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of matching managed folders - * - * Generated from protobuf field repeated .google.storage.control.v2.ManagedFolder managed_folders = 1; - */ - private $managed_folders; - /** - * The continuation token, used to page through large result sets. Provide - * this value in a subsequent request to return the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Storage\Control\V2\ManagedFolder>|\Google\Protobuf\Internal\RepeatedField $managed_folders - * The list of matching managed folders - * @type string $next_page_token - * The continuation token, used to page through large result sets. Provide - * this value in a subsequent request to return the next page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * The list of matching managed folders - * - * Generated from protobuf field repeated .google.storage.control.v2.ManagedFolder managed_folders = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getManagedFolders() - { - return $this->managed_folders; - } - - /** - * The list of matching managed folders - * - * Generated from protobuf field repeated .google.storage.control.v2.ManagedFolder managed_folders = 1; - * @param array<\Google\Cloud\Storage\Control\V2\ManagedFolder>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setManagedFolders($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Storage\Control\V2\ManagedFolder::class); - $this->managed_folders = $arr; - - return $this; - } - - /** - * The continuation token, used to page through large result sets. Provide - * this value in a subsequent request to return the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The continuation token, used to page through large result sets. Provide - * this value in a subsequent request to return the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ManagedFolder.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ManagedFolder.php deleted file mode 100644 index 46a6d1984b82..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ManagedFolder.php +++ /dev/null @@ -1,205 +0,0 @@ -google.storage.control.v2.ManagedFolder - */ -class ManagedFolder extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The name of this managed folder. - * Format: - * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. The metadata version of this managed folder. It increases - * whenever the metadata is updated. Used for preconditions and for detecting - * changes in metadata. Managed folders don't have a generation number. - * - * Generated from protobuf field int64 metageneration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $metageneration = 0; - /** - * Output only. The creation time of the managed folder. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The modification time of the managed folder. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The name of this managed folder. - * Format: - * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` - * @type int|string $metageneration - * Output only. The metadata version of this managed folder. It increases - * whenever the metadata is updated. Used for preconditions and for detecting - * changes in metadata. Managed folders don't have a generation number. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation time of the managed folder. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The modification time of the managed folder. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The name of this managed folder. - * Format: - * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The name of this managed folder. - * Format: - * `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The metadata version of this managed folder. It increases - * whenever the metadata is updated. Used for preconditions and for detecting - * changes in metadata. Managed folders don't have a generation number. - * - * Generated from protobuf field int64 metageneration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getMetageneration() - { - return $this->metageneration; - } - - /** - * Output only. The metadata version of this managed folder. It increases - * whenever the metadata is updated. Used for preconditions and for detecting - * changes in metadata. Managed folders don't have a generation number. - * - * Generated from protobuf field int64 metageneration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setMetageneration($var) - { - GPBUtil::checkInt64($var); - $this->metageneration = $var; - - return $this; - } - - /** - * Output only. The creation time of the managed folder. - * - * 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 creation time of the managed folder. - * - * 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 modification time of the managed folder. - * - * 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 modification time of the managed folder. - * - * 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; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/PauseAnywhereCacheRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/PauseAnywhereCacheRequest.php deleted file mode 100644 index 0b43c4b58a70..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/PauseAnywhereCacheRequest.php +++ /dev/null @@ -1,128 +0,0 @@ -google.storage.control.v2.PauseAnywhereCacheRequest - */ -class PauseAnywhereCacheRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name field in the request should be: - * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. This request is only - * idempotent if a `request_id` is provided. - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $name Required. The name field in the request should be: - * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` - * Please see {@see StorageControlClient::anywhereCacheName()} for help formatting this field. - * - * @return \Google\Cloud\Storage\Control\V2\PauseAnywhereCacheRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name field in the request should be: - * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` - * @type string $request_id - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. This request is only - * idempotent if a `request_id` is provided. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name field in the request should be: - * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name field in the request should be: - * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. This request is only - * idempotent if a `request_id` is provided. - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. This request is only - * idempotent if a `request_id` is provided. - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/PendingRenameInfo.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/PendingRenameInfo.php deleted file mode 100644 index 52172ad37498..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/PendingRenameInfo.php +++ /dev/null @@ -1,67 +0,0 @@ -google.storage.control.v2.PendingRenameInfo - */ -class PendingRenameInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The name of the rename operation. - * - * Generated from protobuf field string operation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $operation = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $operation - * Output only. The name of the rename operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of the rename operation. - * - * Generated from protobuf field string operation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getOperation() - { - return $this->operation; - } - - /** - * Output only. The name of the rename operation. - * - * Generated from protobuf field string operation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setOperation($var) - { - GPBUtil::checkString($var, True); - $this->operation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/RenameFolderMetadata.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/RenameFolderMetadata.php deleted file mode 100644 index d9d0313fd1a7..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/RenameFolderMetadata.php +++ /dev/null @@ -1,146 +0,0 @@ -google.storage.control.v2.RenameFolderMetadata - */ -class RenameFolderMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Generic metadata for the long running operation. - * - * Generated from protobuf field .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; - */ - protected $common_metadata = null; - /** - * The path of the source folder. - * - * Generated from protobuf field string source_folder_id = 2; - */ - protected $source_folder_id = ''; - /** - * The path of the destination folder. - * - * Generated from protobuf field string destination_folder_id = 3; - */ - protected $destination_folder_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata $common_metadata - * Generic metadata for the long running operation. - * @type string $source_folder_id - * The path of the source folder. - * @type string $destination_folder_id - * The path of the destination folder. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Generic metadata for the long running operation. - * - * Generated from protobuf field .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; - * @return \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata|null - */ - public function getCommonMetadata() - { - return $this->common_metadata; - } - - public function hasCommonMetadata() - { - return isset($this->common_metadata); - } - - public function clearCommonMetadata() - { - unset($this->common_metadata); - } - - /** - * Generic metadata for the long running operation. - * - * Generated from protobuf field .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; - * @param \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata $var - * @return $this - */ - public function setCommonMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata::class); - $this->common_metadata = $var; - - return $this; - } - - /** - * The path of the source folder. - * - * Generated from protobuf field string source_folder_id = 2; - * @return string - */ - public function getSourceFolderId() - { - return $this->source_folder_id; - } - - /** - * The path of the source folder. - * - * Generated from protobuf field string source_folder_id = 2; - * @param string $var - * @return $this - */ - public function setSourceFolderId($var) - { - GPBUtil::checkString($var, True); - $this->source_folder_id = $var; - - return $this; - } - - /** - * The path of the destination folder. - * - * Generated from protobuf field string destination_folder_id = 3; - * @return string - */ - public function getDestinationFolderId() - { - return $this->destination_folder_id; - } - - /** - * The path of the destination folder. - * - * Generated from protobuf field string destination_folder_id = 3; - * @param string $var - * @return $this - */ - public function setDestinationFolderId($var) - { - GPBUtil::checkString($var, True); - $this->destination_folder_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/RenameFolderRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/RenameFolderRequest.php deleted file mode 100644 index 6d939843b450..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/RenameFolderRequest.php +++ /dev/null @@ -1,261 +0,0 @@ -google.storage.control.v2.RenameFolderRequest - */ -class RenameFolderRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the source folder being renamed. - * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` - * - * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The destination folder ID, e.g. `foo/bar/`. - * - * Generated from protobuf field string destination_folder_id = 8 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $destination_folder_id = ''; - /** - * Makes the operation only succeed conditional on whether the source - * folder's current metageneration matches the given value. - * - * Generated from protobuf field optional int64 if_metageneration_match = 4; - */ - protected $if_metageneration_match = null; - /** - * Makes the operation only succeed conditional on whether the source - * folder's current metageneration does not match the given value. - * - * Generated from protobuf field optional int64 if_metageneration_not_match = 5; - */ - protected $if_metageneration_not_match = null; - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. This request is only - * idempotent if a `request_id` is provided. - * - * Generated from protobuf field string request_id = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $name Required. Name of the source folder being renamed. - * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` - * Please see {@see StorageControlClient::folderName()} for help formatting this field. - * @param string $destinationFolderId Required. The destination folder ID, e.g. `foo/bar/`. - * - * @return \Google\Cloud\Storage\Control\V2\RenameFolderRequest - * - * @experimental - */ - public static function build(string $name, string $destinationFolderId): self - { - return (new self()) - ->setName($name) - ->setDestinationFolderId($destinationFolderId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the source folder being renamed. - * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` - * @type string $destination_folder_id - * Required. The destination folder ID, e.g. `foo/bar/`. - * @type int|string $if_metageneration_match - * Makes the operation only succeed conditional on whether the source - * folder's current metageneration matches the given value. - * @type int|string $if_metageneration_not_match - * Makes the operation only succeed conditional on whether the source - * folder's current metageneration does not match the given value. - * @type string $request_id - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. This request is only - * idempotent if a `request_id` is provided. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the source folder being renamed. - * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` - * - * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the source folder being renamed. - * Format: `projects/{project}/buckets/{bucket}/folders/{folder}` - * - * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The destination folder ID, e.g. `foo/bar/`. - * - * Generated from protobuf field string destination_folder_id = 8 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDestinationFolderId() - { - return $this->destination_folder_id; - } - - /** - * Required. The destination folder ID, e.g. `foo/bar/`. - * - * Generated from protobuf field string destination_folder_id = 8 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDestinationFolderId($var) - { - GPBUtil::checkString($var, True); - $this->destination_folder_id = $var; - - return $this; - } - - /** - * Makes the operation only succeed conditional on whether the source - * folder's current metageneration matches the given value. - * - * Generated from protobuf field optional int64 if_metageneration_match = 4; - * @return int|string - */ - public function getIfMetagenerationMatch() - { - return isset($this->if_metageneration_match) ? $this->if_metageneration_match : 0; - } - - public function hasIfMetagenerationMatch() - { - return isset($this->if_metageneration_match); - } - - public function clearIfMetagenerationMatch() - { - unset($this->if_metageneration_match); - } - - /** - * Makes the operation only succeed conditional on whether the source - * folder's current metageneration matches the given value. - * - * Generated from protobuf field optional int64 if_metageneration_match = 4; - * @param int|string $var - * @return $this - */ - public function setIfMetagenerationMatch($var) - { - GPBUtil::checkInt64($var); - $this->if_metageneration_match = $var; - - return $this; - } - - /** - * Makes the operation only succeed conditional on whether the source - * folder's current metageneration does not match the given value. - * - * Generated from protobuf field optional int64 if_metageneration_not_match = 5; - * @return int|string - */ - public function getIfMetagenerationNotMatch() - { - return isset($this->if_metageneration_not_match) ? $this->if_metageneration_not_match : 0; - } - - public function hasIfMetagenerationNotMatch() - { - return isset($this->if_metageneration_not_match); - } - - public function clearIfMetagenerationNotMatch() - { - unset($this->if_metageneration_not_match); - } - - /** - * Makes the operation only succeed conditional on whether the source - * folder's current metageneration does not match the given value. - * - * Generated from protobuf field optional int64 if_metageneration_not_match = 5; - * @param int|string $var - * @return $this - */ - public function setIfMetagenerationNotMatch($var) - { - GPBUtil::checkInt64($var); - $this->if_metageneration_not_match = $var; - - return $this; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. This request is only - * idempotent if a `request_id` is provided. - * - * Generated from protobuf field string request_id = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. This request is only - * idempotent if a `request_id` is provided. - * - * Generated from protobuf field string request_id = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ResumeAnywhereCacheRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ResumeAnywhereCacheRequest.php deleted file mode 100644 index 9ea6a3bc7471..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/ResumeAnywhereCacheRequest.php +++ /dev/null @@ -1,128 +0,0 @@ -google.storage.control.v2.ResumeAnywhereCacheRequest - */ -class ResumeAnywhereCacheRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name field in the request should be: - * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. This request is only - * idempotent if a `request_id` is provided. - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $name Required. The name field in the request should be: - * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` - * Please see {@see StorageControlClient::anywhereCacheName()} for help formatting this field. - * - * @return \Google\Cloud\Storage\Control\V2\ResumeAnywhereCacheRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name field in the request should be: - * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` - * @type string $request_id - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. This request is only - * idempotent if a `request_id` is provided. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name field in the request should be: - * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name field in the request should be: - * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. This request is only - * idempotent if a `request_id` is provided. - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. This request is only - * idempotent if a `request_id` is provided. - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout.php deleted file mode 100644 index a48fbe8ef2ee..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout.php +++ /dev/null @@ -1,239 +0,0 @@ -google.storage.control.v2.StorageLayout - */ -class StorageLayout extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The name of the StorageLayout resource. - * Format: `projects/{project}/buckets/{bucket}/storageLayout` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The location of the bucket. - * - * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $location = ''; - /** - * Output only. The location type of the bucket (region, dual-region, - * multi-region, etc). - * - * Generated from protobuf field string location_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $location_type = ''; - /** - * Output only. The data placement configuration for custom dual region. If - * there is no configuration, this is not a custom dual region bucket. - * - * Generated from protobuf field .google.storage.control.v2.StorageLayout.CustomPlacementConfig custom_placement_config = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $custom_placement_config = null; - /** - * Output only. The bucket's hierarchical namespace configuration. If there is - * no configuration, the hierarchical namespace is disabled. - * - * Generated from protobuf field .google.storage.control.v2.StorageLayout.HierarchicalNamespace hierarchical_namespace = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $hierarchical_namespace = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The name of the StorageLayout resource. - * Format: `projects/{project}/buckets/{bucket}/storageLayout` - * @type string $location - * Output only. The location of the bucket. - * @type string $location_type - * Output only. The location type of the bucket (region, dual-region, - * multi-region, etc). - * @type \Google\Cloud\Storage\Control\V2\StorageLayout\CustomPlacementConfig $custom_placement_config - * Output only. The data placement configuration for custom dual region. If - * there is no configuration, this is not a custom dual region bucket. - * @type \Google\Cloud\Storage\Control\V2\StorageLayout\HierarchicalNamespace $hierarchical_namespace - * Output only. The bucket's hierarchical namespace configuration. If there is - * no configuration, the hierarchical namespace is disabled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of the StorageLayout resource. - * Format: `projects/{project}/buckets/{bucket}/storageLayout` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The name of the StorageLayout resource. - * Format: `projects/{project}/buckets/{bucket}/storageLayout` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The location of the bucket. - * - * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Output only. The location of the bucket. - * - * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - - /** - * Output only. The location type of the bucket (region, dual-region, - * multi-region, etc). - * - * Generated from protobuf field string location_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getLocationType() - { - return $this->location_type; - } - - /** - * Output only. The location type of the bucket (region, dual-region, - * multi-region, etc). - * - * Generated from protobuf field string location_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setLocationType($var) - { - GPBUtil::checkString($var, True); - $this->location_type = $var; - - return $this; - } - - /** - * Output only. The data placement configuration for custom dual region. If - * there is no configuration, this is not a custom dual region bucket. - * - * Generated from protobuf field .google.storage.control.v2.StorageLayout.CustomPlacementConfig custom_placement_config = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Storage\Control\V2\StorageLayout\CustomPlacementConfig|null - */ - public function getCustomPlacementConfig() - { - return $this->custom_placement_config; - } - - public function hasCustomPlacementConfig() - { - return isset($this->custom_placement_config); - } - - public function clearCustomPlacementConfig() - { - unset($this->custom_placement_config); - } - - /** - * Output only. The data placement configuration for custom dual region. If - * there is no configuration, this is not a custom dual region bucket. - * - * Generated from protobuf field .google.storage.control.v2.StorageLayout.CustomPlacementConfig custom_placement_config = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Storage\Control\V2\StorageLayout\CustomPlacementConfig $var - * @return $this - */ - public function setCustomPlacementConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\StorageLayout\CustomPlacementConfig::class); - $this->custom_placement_config = $var; - - return $this; - } - - /** - * Output only. The bucket's hierarchical namespace configuration. If there is - * no configuration, the hierarchical namespace is disabled. - * - * Generated from protobuf field .google.storage.control.v2.StorageLayout.HierarchicalNamespace hierarchical_namespace = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Storage\Control\V2\StorageLayout\HierarchicalNamespace|null - */ - public function getHierarchicalNamespace() - { - return $this->hierarchical_namespace; - } - - public function hasHierarchicalNamespace() - { - return isset($this->hierarchical_namespace); - } - - public function clearHierarchicalNamespace() - { - unset($this->hierarchical_namespace); - } - - /** - * Output only. The bucket's hierarchical namespace configuration. If there is - * no configuration, the hierarchical namespace is disabled. - * - * Generated from protobuf field .google.storage.control.v2.StorageLayout.HierarchicalNamespace hierarchical_namespace = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Storage\Control\V2\StorageLayout\HierarchicalNamespace $var - * @return $this - */ - public function setHierarchicalNamespace($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\StorageLayout\HierarchicalNamespace::class); - $this->hierarchical_namespace = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout/CustomPlacementConfig.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout/CustomPlacementConfig.php deleted file mode 100644 index 0bda81218e0a..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout/CustomPlacementConfig.php +++ /dev/null @@ -1,72 +0,0 @@ -google.storage.control.v2.StorageLayout.CustomPlacementConfig - */ -class CustomPlacementConfig extends \Google\Protobuf\Internal\Message -{ - /** - * List of locations to use for data placement. - * - * Generated from protobuf field repeated string data_locations = 1; - */ - private $data_locations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $data_locations - * List of locations to use for data placement. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * List of locations to use for data placement. - * - * Generated from protobuf field repeated string data_locations = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDataLocations() - { - return $this->data_locations; - } - - /** - * List of locations to use for data placement. - * - * Generated from protobuf field repeated string data_locations = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDataLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->data_locations = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CustomPlacementConfig::class, \Google\Cloud\Storage\Control\V2\StorageLayout_CustomPlacementConfig::class); - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout/HierarchicalNamespace.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout/HierarchicalNamespace.php deleted file mode 100644 index 34e91aff6d81..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/StorageLayout/HierarchicalNamespace.php +++ /dev/null @@ -1,70 +0,0 @@ -google.storage.control.v2.StorageLayout.HierarchicalNamespace - */ -class HierarchicalNamespace extends \Google\Protobuf\Internal\Message -{ - /** - * Enables the hierarchical namespace feature. - * - * Generated from protobuf field bool enabled = 1; - */ - protected $enabled = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enabled - * Enables the hierarchical namespace feature. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Enables the hierarchical namespace feature. - * - * Generated from protobuf field bool enabled = 1; - * @return bool - */ - public function getEnabled() - { - return $this->enabled; - } - - /** - * Enables the hierarchical namespace feature. - * - * Generated from protobuf field bool enabled = 1; - * @param bool $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkBool($var); - $this->enabled = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(HierarchicalNamespace::class, \Google\Cloud\Storage\Control\V2\StorageLayout_HierarchicalNamespace::class); - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateAnywhereCacheMetadata.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateAnywhereCacheMetadata.php deleted file mode 100644 index df41790789f0..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateAnywhereCacheMetadata.php +++ /dev/null @@ -1,274 +0,0 @@ -google.storage.control.v2.UpdateAnywhereCacheMetadata - */ -class UpdateAnywhereCacheMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Generic metadata for the long running operation. - * - * Generated from protobuf field .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; - */ - protected $common_metadata = null; - /** - * Anywhere Cache ID. - * - * Generated from protobuf field optional string anywhere_cache_id = 2; - */ - protected $anywhere_cache_id = null; - /** - * The zone in which the cache instance is running. For example, - * us-central1-a. - * - * Generated from protobuf field optional string zone = 5; - */ - protected $zone = null; - /** - * Anywhere Cache entry's TTL between 1h and 7days. A cache-level config that - * is applied to all new cache entries on admission. If `ttl` is pending - * update, this field equals to the new value specified in the Update request. - * - * Generated from protobuf field optional .google.protobuf.Duration ttl = 3; - */ - protected $ttl = null; - /** - * L4 Cache entry Admission Policy in kebab-case (e.g., - * "admit-on-first-miss"). If `admission_policy` is pending - * update, this field equals to the new value specified in the Update request. - * - * Generated from protobuf field optional string admission_policy = 4; - */ - protected $admission_policy = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata $common_metadata - * Generic metadata for the long running operation. - * @type string $anywhere_cache_id - * Anywhere Cache ID. - * @type string $zone - * The zone in which the cache instance is running. For example, - * us-central1-a. - * @type \Google\Protobuf\Duration $ttl - * Anywhere Cache entry's TTL between 1h and 7days. A cache-level config that - * is applied to all new cache entries on admission. If `ttl` is pending - * update, this field equals to the new value specified in the Update request. - * @type string $admission_policy - * L4 Cache entry Admission Policy in kebab-case (e.g., - * "admit-on-first-miss"). If `admission_policy` is pending - * update, this field equals to the new value specified in the Update request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Generic metadata for the long running operation. - * - * Generated from protobuf field .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; - * @return \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata|null - */ - public function getCommonMetadata() - { - return $this->common_metadata; - } - - public function hasCommonMetadata() - { - return isset($this->common_metadata); - } - - public function clearCommonMetadata() - { - unset($this->common_metadata); - } - - /** - * Generic metadata for the long running operation. - * - * Generated from protobuf field .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; - * @param \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata $var - * @return $this - */ - public function setCommonMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\CommonLongRunningOperationMetadata::class); - $this->common_metadata = $var; - - return $this; - } - - /** - * Anywhere Cache ID. - * - * Generated from protobuf field optional string anywhere_cache_id = 2; - * @return string - */ - public function getAnywhereCacheId() - { - return isset($this->anywhere_cache_id) ? $this->anywhere_cache_id : ''; - } - - public function hasAnywhereCacheId() - { - return isset($this->anywhere_cache_id); - } - - public function clearAnywhereCacheId() - { - unset($this->anywhere_cache_id); - } - - /** - * Anywhere Cache ID. - * - * Generated from protobuf field optional string anywhere_cache_id = 2; - * @param string $var - * @return $this - */ - public function setAnywhereCacheId($var) - { - GPBUtil::checkString($var, True); - $this->anywhere_cache_id = $var; - - return $this; - } - - /** - * The zone in which the cache instance is running. For example, - * us-central1-a. - * - * Generated from protobuf field optional string zone = 5; - * @return string - */ - public function getZone() - { - return isset($this->zone) ? $this->zone : ''; - } - - public function hasZone() - { - return isset($this->zone); - } - - public function clearZone() - { - unset($this->zone); - } - - /** - * The zone in which the cache instance is running. For example, - * us-central1-a. - * - * Generated from protobuf field optional string zone = 5; - * @param string $var - * @return $this - */ - public function setZone($var) - { - GPBUtil::checkString($var, True); - $this->zone = $var; - - return $this; - } - - /** - * Anywhere Cache entry's TTL between 1h and 7days. A cache-level config that - * is applied to all new cache entries on admission. If `ttl` is pending - * update, this field equals to the new value specified in the Update request. - * - * Generated from protobuf field optional .google.protobuf.Duration ttl = 3; - * @return \Google\Protobuf\Duration|null - */ - public function getTtl() - { - return $this->ttl; - } - - public function hasTtl() - { - return isset($this->ttl); - } - - public function clearTtl() - { - unset($this->ttl); - } - - /** - * Anywhere Cache entry's TTL between 1h and 7days. A cache-level config that - * is applied to all new cache entries on admission. If `ttl` is pending - * update, this field equals to the new value specified in the Update request. - * - * Generated from protobuf field optional .google.protobuf.Duration ttl = 3; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTtl($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->ttl = $var; - - return $this; - } - - /** - * L4 Cache entry Admission Policy in kebab-case (e.g., - * "admit-on-first-miss"). If `admission_policy` is pending - * update, this field equals to the new value specified in the Update request. - * - * Generated from protobuf field optional string admission_policy = 4; - * @return string - */ - public function getAdmissionPolicy() - { - return isset($this->admission_policy) ? $this->admission_policy : ''; - } - - public function hasAdmissionPolicy() - { - return isset($this->admission_policy); - } - - public function clearAdmissionPolicy() - { - unset($this->admission_policy); - } - - /** - * L4 Cache entry Admission Policy in kebab-case (e.g., - * "admit-on-first-miss"). If `admission_policy` is pending - * update, this field equals to the new value specified in the Update request. - * - * Generated from protobuf field optional string admission_policy = 4; - * @param string $var - * @return $this - */ - public function setAdmissionPolicy($var) - { - GPBUtil::checkString($var, True); - $this->admission_policy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateAnywhereCacheRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateAnywhereCacheRequest.php deleted file mode 100644 index b1cc13f7a574..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateAnywhereCacheRequest.php +++ /dev/null @@ -1,210 +0,0 @@ -google.storage.control.v2.UpdateAnywhereCacheRequest - */ -class UpdateAnywhereCacheRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Anywhere Cache instance to be updated. - * - * Generated from protobuf field .google.storage.control.v2.AnywhereCache anywhere_cache = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $anywhere_cache = null; - /** - * Required. List of fields to be updated. Mutable fields of AnywhereCache - * include `ttl` and `admission_policy`. - * To specify ALL fields, specify a single field with the value `*`. Note: We - * recommend against doing this. If a new field is introduced at a later time, - * an older client updating with the `*` may accidentally reset the new - * field's value. - * Not specifying any fields is an error. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. This request is only - * idempotent if a `request_id` is provided. - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\Storage\Control\V2\AnywhereCache $anywhereCache Required. The Anywhere Cache instance to be updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. List of fields to be updated. Mutable fields of AnywhereCache - * include `ttl` and `admission_policy`. - * - * To specify ALL fields, specify a single field with the value `*`. Note: We - * recommend against doing this. If a new field is introduced at a later time, - * an older client updating with the `*` may accidentally reset the new - * field's value. - * - * Not specifying any fields is an error. - * - * @return \Google\Cloud\Storage\Control\V2\UpdateAnywhereCacheRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Storage\Control\V2\AnywhereCache $anywhereCache, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setAnywhereCache($anywhereCache) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Storage\Control\V2\AnywhereCache $anywhere_cache - * Required. The Anywhere Cache instance to be updated. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. List of fields to be updated. Mutable fields of AnywhereCache - * include `ttl` and `admission_policy`. - * To specify ALL fields, specify a single field with the value `*`. Note: We - * recommend against doing this. If a new field is introduced at a later time, - * an older client updating with the `*` may accidentally reset the new - * field's value. - * Not specifying any fields is an error. - * @type string $request_id - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. This request is only - * idempotent if a `request_id` is provided. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Anywhere Cache instance to be updated. - * - * Generated from protobuf field .google.storage.control.v2.AnywhereCache anywhere_cache = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Storage\Control\V2\AnywhereCache|null - */ - public function getAnywhereCache() - { - return $this->anywhere_cache; - } - - public function hasAnywhereCache() - { - return isset($this->anywhere_cache); - } - - public function clearAnywhereCache() - { - unset($this->anywhere_cache); - } - - /** - * Required. The Anywhere Cache instance to be updated. - * - * Generated from protobuf field .google.storage.control.v2.AnywhereCache anywhere_cache = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Storage\Control\V2\AnywhereCache $var - * @return $this - */ - public function setAnywhereCache($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\AnywhereCache::class); - $this->anywhere_cache = $var; - - return $this; - } - - /** - * Required. List of fields to be updated. Mutable fields of AnywhereCache - * include `ttl` and `admission_policy`. - * To specify ALL fields, specify a single field with the value `*`. Note: We - * recommend against doing this. If a new field is introduced at a later time, - * an older client updating with the `*` may accidentally reset the new - * field's value. - * Not specifying any fields is an error. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. List of fields to be updated. Mutable fields of AnywhereCache - * include `ttl` and `admission_policy`. - * To specify ALL fields, specify a single field with the value `*`. Note: We - * recommend against doing this. If a new field is introduced at a later time, - * an older client updating with the `*` may accidentally reset the new - * field's value. - * Not specifying any fields is an error. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. This request is only - * idempotent if a `request_id` is provided. - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A unique identifier for this request. UUID is the recommended - * format, but other formats are still accepted. This request is only - * idempotent if a `request_id` is provided. - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateFolderIntelligenceConfigRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateFolderIntelligenceConfigRequest.php deleted file mode 100644 index 006e1da7cae4..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateFolderIntelligenceConfigRequest.php +++ /dev/null @@ -1,189 +0,0 @@ -google.storage.control.v2.UpdateFolderIntelligenceConfigRequest - */ -class UpdateFolderIntelligenceConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The `IntelligenceConfig` resource to be updated. - * - * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $intelligence_config = null; - /** - * Required. The `update_mask` that specifies the fields within the - * `IntelligenceConfig` resource that should be modified by this update. Only - * the listed fields are updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Optional. The ID that uniquely identifies the request, preventing duplicate - * processing. - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\Storage\Control\V2\IntelligenceConfig $intelligenceConfig Required. The `IntelligenceConfig` resource to be updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. The `update_mask` that specifies the fields within the - * `IntelligenceConfig` resource that should be modified by this update. Only - * the listed fields are updated. - * - * @return \Google\Cloud\Storage\Control\V2\UpdateFolderIntelligenceConfigRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Storage\Control\V2\IntelligenceConfig $intelligenceConfig, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setIntelligenceConfig($intelligenceConfig) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Storage\Control\V2\IntelligenceConfig $intelligence_config - * Required. The `IntelligenceConfig` resource to be updated. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The `update_mask` that specifies the fields within the - * `IntelligenceConfig` resource that should be modified by this update. Only - * the listed fields are updated. - * @type string $request_id - * Optional. The ID that uniquely identifies the request, preventing duplicate - * processing. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. The `IntelligenceConfig` resource to be updated. - * - * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Storage\Control\V2\IntelligenceConfig|null - */ - public function getIntelligenceConfig() - { - return $this->intelligence_config; - } - - public function hasIntelligenceConfig() - { - return isset($this->intelligence_config); - } - - public function clearIntelligenceConfig() - { - unset($this->intelligence_config); - } - - /** - * Required. The `IntelligenceConfig` resource to be updated. - * - * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Storage\Control\V2\IntelligenceConfig $var - * @return $this - */ - public function setIntelligenceConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\IntelligenceConfig::class); - $this->intelligence_config = $var; - - return $this; - } - - /** - * Required. The `update_mask` that specifies the fields within the - * `IntelligenceConfig` resource that should be modified by this update. Only - * the listed fields are updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. The `update_mask` that specifies the fields within the - * `IntelligenceConfig` resource that should be modified by this update. Only - * the listed fields are updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Optional. The ID that uniquely identifies the request, preventing duplicate - * processing. - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. The ID that uniquely identifies the request, preventing duplicate - * processing. - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateOrganizationIntelligenceConfigRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateOrganizationIntelligenceConfigRequest.php deleted file mode 100644 index d30db75be5a6..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateOrganizationIntelligenceConfigRequest.php +++ /dev/null @@ -1,189 +0,0 @@ -google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest - */ -class UpdateOrganizationIntelligenceConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The `IntelligenceConfig` resource to be updated. - * - * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $intelligence_config = null; - /** - * Required. The `update_mask` that specifies the fields within the - * `IntelligenceConfig` resource that should be modified by this update. Only - * the listed fields are updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Optional. The ID that uniquely identifies the request, preventing duplicate - * processing. - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\Storage\Control\V2\IntelligenceConfig $intelligenceConfig Required. The `IntelligenceConfig` resource to be updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. The `update_mask` that specifies the fields within the - * `IntelligenceConfig` resource that should be modified by this update. Only - * the listed fields are updated. - * - * @return \Google\Cloud\Storage\Control\V2\UpdateOrganizationIntelligenceConfigRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Storage\Control\V2\IntelligenceConfig $intelligenceConfig, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setIntelligenceConfig($intelligenceConfig) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Storage\Control\V2\IntelligenceConfig $intelligence_config - * Required. The `IntelligenceConfig` resource to be updated. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The `update_mask` that specifies the fields within the - * `IntelligenceConfig` resource that should be modified by this update. Only - * the listed fields are updated. - * @type string $request_id - * Optional. The ID that uniquely identifies the request, preventing duplicate - * processing. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. The `IntelligenceConfig` resource to be updated. - * - * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Storage\Control\V2\IntelligenceConfig|null - */ - public function getIntelligenceConfig() - { - return $this->intelligence_config; - } - - public function hasIntelligenceConfig() - { - return isset($this->intelligence_config); - } - - public function clearIntelligenceConfig() - { - unset($this->intelligence_config); - } - - /** - * Required. The `IntelligenceConfig` resource to be updated. - * - * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Storage\Control\V2\IntelligenceConfig $var - * @return $this - */ - public function setIntelligenceConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\IntelligenceConfig::class); - $this->intelligence_config = $var; - - return $this; - } - - /** - * Required. The `update_mask` that specifies the fields within the - * `IntelligenceConfig` resource that should be modified by this update. Only - * the listed fields are updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. The `update_mask` that specifies the fields within the - * `IntelligenceConfig` resource that should be modified by this update. Only - * the listed fields are updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Optional. The ID that uniquely identifies the request, preventing duplicate - * processing. - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. The ID that uniquely identifies the request, preventing duplicate - * processing. - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateProjectIntelligenceConfigRequest.php b/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateProjectIntelligenceConfigRequest.php deleted file mode 100644 index 72012d4cad8c..000000000000 --- a/owl-bot-staging/StorageControl/v2/proto/src/Google/Cloud/Storage/Control/V2/UpdateProjectIntelligenceConfigRequest.php +++ /dev/null @@ -1,189 +0,0 @@ -google.storage.control.v2.UpdateProjectIntelligenceConfigRequest - */ -class UpdateProjectIntelligenceConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The `IntelligenceConfig` resource to be updated. - * - * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $intelligence_config = null; - /** - * Required. The `update_mask` that specifies the fields within the - * `IntelligenceConfig` resource that should be modified by this update. Only - * the listed fields are updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Optional. The ID that uniquely identifies the request, preventing duplicate - * processing. - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\Storage\Control\V2\IntelligenceConfig $intelligenceConfig Required. The `IntelligenceConfig` resource to be updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. The `update_mask` that specifies the fields within the - * `IntelligenceConfig` resource that should be modified by this update. Only - * the listed fields are updated. - * - * @return \Google\Cloud\Storage\Control\V2\UpdateProjectIntelligenceConfigRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Storage\Control\V2\IntelligenceConfig $intelligenceConfig, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setIntelligenceConfig($intelligenceConfig) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Storage\Control\V2\IntelligenceConfig $intelligence_config - * Required. The `IntelligenceConfig` resource to be updated. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The `update_mask` that specifies the fields within the - * `IntelligenceConfig` resource that should be modified by this update. Only - * the listed fields are updated. - * @type string $request_id - * Optional. The ID that uniquely identifies the request, preventing duplicate - * processing. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Storage\Control\V2\StorageControl::initOnce(); - parent::__construct($data); - } - - /** - * Required. The `IntelligenceConfig` resource to be updated. - * - * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Storage\Control\V2\IntelligenceConfig|null - */ - public function getIntelligenceConfig() - { - return $this->intelligence_config; - } - - public function hasIntelligenceConfig() - { - return isset($this->intelligence_config); - } - - public function clearIntelligenceConfig() - { - unset($this->intelligence_config); - } - - /** - * Required. The `IntelligenceConfig` resource to be updated. - * - * Generated from protobuf field .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Storage\Control\V2\IntelligenceConfig $var - * @return $this - */ - public function setIntelligenceConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Storage\Control\V2\IntelligenceConfig::class); - $this->intelligence_config = $var; - - return $this; - } - - /** - * Required. The `update_mask` that specifies the fields within the - * `IntelligenceConfig` resource that should be modified by this update. Only - * the listed fields are updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. The `update_mask` that specifies the fields within the - * `IntelligenceConfig` resource that should be modified by this update. Only - * the listed fields are updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Optional. The ID that uniquely identifies the request, preventing duplicate - * processing. - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. The ID that uniquely identifies the request, preventing duplicate - * processing. - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_anywhere_cache.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_anywhere_cache.php deleted file mode 100644 index f1abdf077849..000000000000 --- a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_anywhere_cache.php +++ /dev/null @@ -1,86 +0,0 @@ -setParent($formattedParent) - ->setAnywhereCache($anywhereCache); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $storageControlClient->createAnywhereCache($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AnywhereCache $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = StorageControlClient::bucketName('[PROJECT]', '[BUCKET]'); - - create_anywhere_cache_sample($formattedParent); -} -// [END storage_v2_generated_StorageControl_CreateAnywhereCache_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_folder.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_folder.php deleted file mode 100644 index a3d84c55b7fe..000000000000 --- a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_folder.php +++ /dev/null @@ -1,82 +0,0 @@ -setParent($formattedParent) - ->setFolder($folder) - ->setFolderId($folderId); - - // Call the API and handle any network failures. - try { - /** @var Folder $response */ - $response = $storageControlClient->createFolder($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = StorageControlClient::bucketName('[PROJECT]', '[BUCKET]'); - $folderId = '[FOLDER_ID]'; - - create_folder_sample($formattedParent, $folderId); -} -// [END storage_v2_generated_StorageControl_CreateFolder_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_managed_folder.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_managed_folder.php deleted file mode 100644 index 115da2605b90..000000000000 --- a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/create_managed_folder.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent) - ->setManagedFolder($managedFolder) - ->setManagedFolderId($managedFolderId); - - // Call the API and handle any network failures. - try { - /** @var ManagedFolder $response */ - $response = $storageControlClient->createManagedFolder($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = StorageControlClient::bucketName('[PROJECT]', '[BUCKET]'); - $managedFolderId = '[MANAGED_FOLDER_ID]'; - - create_managed_folder_sample($formattedParent, $managedFolderId); -} -// [END storage_v2_generated_StorageControl_CreateManagedFolder_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/delete_folder.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/delete_folder.php deleted file mode 100644 index a992870e4ed6..000000000000 --- a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/delete_folder.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $storageControlClient->deleteFolder($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = StorageControlClient::folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); - - delete_folder_sample($formattedName); -} -// [END storage_v2_generated_StorageControl_DeleteFolder_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/delete_managed_folder.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/delete_managed_folder.php deleted file mode 100644 index 086301f28714..000000000000 --- a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/delete_managed_folder.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $storageControlClient->deleteManagedFolder($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = StorageControlClient::managedFolderName( - '[PROJECT]', - '[BUCKET]', - '[MANAGED_FOLDER]' - ); - - delete_managed_folder_sample($formattedName); -} -// [END storage_v2_generated_StorageControl_DeleteManagedFolder_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/disable_anywhere_cache.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/disable_anywhere_cache.php deleted file mode 100644 index 64bdbd4a789b..000000000000 --- a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/disable_anywhere_cache.php +++ /dev/null @@ -1,79 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AnywhereCache $response */ - $response = $storageControlClient->disableAnywhereCache($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = StorageControlClient::anywhereCacheName( - '[PROJECT]', - '[BUCKET]', - '[ANYWHERE_CACHE]' - ); - - disable_anywhere_cache_sample($formattedName); -} -// [END storage_v2_generated_StorageControl_DisableAnywhereCache_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_anywhere_cache.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_anywhere_cache.php deleted file mode 100644 index 1176e557d53e..000000000000 --- a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_anywhere_cache.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AnywhereCache $response */ - $response = $storageControlClient->getAnywhereCache($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = StorageControlClient::anywhereCacheName( - '[PROJECT]', - '[BUCKET]', - '[ANYWHERE_CACHE]' - ); - - get_anywhere_cache_sample($formattedName); -} -// [END storage_v2_generated_StorageControl_GetAnywhereCache_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_folder.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_folder.php deleted file mode 100644 index c8bcd26c27bf..000000000000 --- a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_folder.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Folder $response */ - $response = $storageControlClient->getFolder($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = StorageControlClient::folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); - - get_folder_sample($formattedName); -} -// [END storage_v2_generated_StorageControl_GetFolder_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_folder_intelligence_config.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_folder_intelligence_config.php deleted file mode 100644 index 363c7e925757..000000000000 --- a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_folder_intelligence_config.php +++ /dev/null @@ -1,74 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var IntelligenceConfig $response */ - $response = $storageControlClient->getFolderIntelligenceConfig($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = StorageControlClient::intelligenceConfigName('[FOLDER]', '[LOCATION]'); - - get_folder_intelligence_config_sample($formattedName); -} -// [END storage_v2_generated_StorageControl_GetFolderIntelligenceConfig_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_iam_policy.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_iam_policy.php deleted file mode 100644 index 9f4534c8b9f7..000000000000 --- a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_iam_policy.php +++ /dev/null @@ -1,75 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $storageControlClient->getIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END storage_v2_generated_StorageControl_GetIamPolicy_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_managed_folder.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_managed_folder.php deleted file mode 100644 index 1a8f281b262c..000000000000 --- a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_managed_folder.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ManagedFolder $response */ - $response = $storageControlClient->getManagedFolder($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = StorageControlClient::managedFolderName( - '[PROJECT]', - '[BUCKET]', - '[MANAGED_FOLDER]' - ); - - get_managed_folder_sample($formattedName); -} -// [END storage_v2_generated_StorageControl_GetManagedFolder_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_organization_intelligence_config.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_organization_intelligence_config.php deleted file mode 100644 index a50fa068a7d1..000000000000 --- a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_organization_intelligence_config.php +++ /dev/null @@ -1,74 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var IntelligenceConfig $response */ - $response = $storageControlClient->getOrganizationIntelligenceConfig($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = StorageControlClient::intelligenceConfigName('[FOLDER]', '[LOCATION]'); - - get_organization_intelligence_config_sample($formattedName); -} -// [END storage_v2_generated_StorageControl_GetOrganizationIntelligenceConfig_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_project_intelligence_config.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_project_intelligence_config.php deleted file mode 100644 index c5ffef33f7be..000000000000 --- a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_project_intelligence_config.php +++ /dev/null @@ -1,74 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var IntelligenceConfig $response */ - $response = $storageControlClient->getProjectIntelligenceConfig($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = StorageControlClient::intelligenceConfigName('[FOLDER]', '[LOCATION]'); - - get_project_intelligence_config_sample($formattedName); -} -// [END storage_v2_generated_StorageControl_GetProjectIntelligenceConfig_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_storage_layout.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_storage_layout.php deleted file mode 100644 index ee089863ac32..000000000000 --- a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/get_storage_layout.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var StorageLayout $response */ - $response = $storageControlClient->getStorageLayout($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = StorageControlClient::storageLayoutName('[PROJECT]', '[BUCKET]'); - - get_storage_layout_sample($formattedName); -} -// [END storage_v2_generated_StorageControl_GetStorageLayout_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_anywhere_caches.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_anywhere_caches.php deleted file mode 100644 index 6d6754a83567..000000000000 --- a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_anywhere_caches.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $storageControlClient->listAnywhereCaches($request); - - /** @var AnywhereCache $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = StorageControlClient::bucketName('[PROJECT]', '[BUCKET]'); - - list_anywhere_caches_sample($formattedParent); -} -// [END storage_v2_generated_StorageControl_ListAnywhereCaches_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_folders.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_folders.php deleted file mode 100644 index 20a07c85fc6b..000000000000 --- a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_folders.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $storageControlClient->listFolders($request); - - /** @var Folder $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = StorageControlClient::bucketName('[PROJECT]', '[BUCKET]'); - - list_folders_sample($formattedParent); -} -// [END storage_v2_generated_StorageControl_ListFolders_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_managed_folders.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_managed_folders.php deleted file mode 100644 index 809d0486c77a..000000000000 --- a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/list_managed_folders.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $storageControlClient->listManagedFolders($request); - - /** @var ManagedFolder $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = StorageControlClient::bucketName('[PROJECT]', '[BUCKET]'); - - list_managed_folders_sample($formattedParent); -} -// [END storage_v2_generated_StorageControl_ListManagedFolders_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/pause_anywhere_cache.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/pause_anywhere_cache.php deleted file mode 100644 index b9deb9aba4fa..000000000000 --- a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/pause_anywhere_cache.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AnywhereCache $response */ - $response = $storageControlClient->pauseAnywhereCache($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = StorageControlClient::anywhereCacheName( - '[PROJECT]', - '[BUCKET]', - '[ANYWHERE_CACHE]' - ); - - pause_anywhere_cache_sample($formattedName); -} -// [END storage_v2_generated_StorageControl_PauseAnywhereCache_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/rename_folder.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/rename_folder.php deleted file mode 100644 index 0e4ec186638c..000000000000 --- a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/rename_folder.php +++ /dev/null @@ -1,90 +0,0 @@ -setName($formattedName) - ->setDestinationFolderId($destinationFolderId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $storageControlClient->renameFolder($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Folder $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = StorageControlClient::folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); - $destinationFolderId = '[DESTINATION_FOLDER_ID]'; - - rename_folder_sample($formattedName, $destinationFolderId); -} -// [END storage_v2_generated_StorageControl_RenameFolder_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/resume_anywhere_cache.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/resume_anywhere_cache.php deleted file mode 100644 index c2ae6bf6690f..000000000000 --- a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/resume_anywhere_cache.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AnywhereCache $response */ - $response = $storageControlClient->resumeAnywhereCache($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = StorageControlClient::anywhereCacheName( - '[PROJECT]', - '[BUCKET]', - '[ANYWHERE_CACHE]' - ); - - resume_anywhere_cache_sample($formattedName); -} -// [END storage_v2_generated_StorageControl_ResumeAnywhereCache_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/set_iam_policy.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/set_iam_policy.php deleted file mode 100644 index 8c1c9cfa0f7b..000000000000 --- a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $storageControlClient->setIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END storage_v2_generated_StorageControl_SetIamPolicy_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/test_iam_permissions.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/test_iam_permissions.php deleted file mode 100644 index 086e576654b7..000000000000 --- a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/test_iam_permissions.php +++ /dev/null @@ -1,84 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $storageControlClient->testIamPermissions($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END storage_v2_generated_StorageControl_TestIamPermissions_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/update_anywhere_cache.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/update_anywhere_cache.php deleted file mode 100644 index cf85b1f97fb6..000000000000 --- a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/update_anywhere_cache.php +++ /dev/null @@ -1,75 +0,0 @@ -setAnywhereCache($anywhereCache) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $storageControlClient->updateAnywhereCache($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AnywhereCache $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END storage_v2_generated_StorageControl_UpdateAnywhereCache_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/update_folder_intelligence_config.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/update_folder_intelligence_config.php deleted file mode 100644 index 52f9ea64a70c..000000000000 --- a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/update_folder_intelligence_config.php +++ /dev/null @@ -1,62 +0,0 @@ -setIntelligenceConfig($intelligenceConfig) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var IntelligenceConfig $response */ - $response = $storageControlClient->updateFolderIntelligenceConfig($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END storage_v2_generated_StorageControl_UpdateFolderIntelligenceConfig_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/update_organization_intelligence_config.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/update_organization_intelligence_config.php deleted file mode 100644 index b4540c406cd5..000000000000 --- a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/update_organization_intelligence_config.php +++ /dev/null @@ -1,62 +0,0 @@ -setIntelligenceConfig($intelligenceConfig) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var IntelligenceConfig $response */ - $response = $storageControlClient->updateOrganizationIntelligenceConfig($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END storage_v2_generated_StorageControl_UpdateOrganizationIntelligenceConfig_sync] diff --git a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/update_project_intelligence_config.php b/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/update_project_intelligence_config.php deleted file mode 100644 index 068360da11ff..000000000000 --- a/owl-bot-staging/StorageControl/v2/samples/V2/StorageControlClient/update_project_intelligence_config.php +++ /dev/null @@ -1,62 +0,0 @@ -setIntelligenceConfig($intelligenceConfig) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var IntelligenceConfig $response */ - $response = $storageControlClient->updateProjectIntelligenceConfig($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END storage_v2_generated_StorageControl_UpdateProjectIntelligenceConfig_sync] diff --git a/owl-bot-staging/StorageControl/v2/src/V2/Client/StorageControlClient.php b/owl-bot-staging/StorageControl/v2/src/V2/Client/StorageControlClient.php deleted file mode 100644 index bd1a30d659a1..000000000000 --- a/owl-bot-staging/StorageControl/v2/src/V2/Client/StorageControlClient.php +++ /dev/null @@ -1,1224 +0,0 @@ - createAnywhereCacheAsync(CreateAnywhereCacheRequest $request, array $optionalArgs = []) - * @method PromiseInterface createFolderAsync(CreateFolderRequest $request, array $optionalArgs = []) - * @method PromiseInterface createManagedFolderAsync(CreateManagedFolderRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteFolderAsync(DeleteFolderRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteFolderRecursiveAsync(DeleteFolderRecursiveRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteManagedFolderAsync(DeleteManagedFolderRequest $request, array $optionalArgs = []) - * @method PromiseInterface disableAnywhereCacheAsync(DisableAnywhereCacheRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAnywhereCacheAsync(GetAnywhereCacheRequest $request, array $optionalArgs = []) - * @method PromiseInterface getFolderAsync(GetFolderRequest $request, array $optionalArgs = []) - * @method PromiseInterface getFolderIntelligenceConfigAsync(GetFolderIntelligenceConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getManagedFolderAsync(GetManagedFolderRequest $request, array $optionalArgs = []) - * @method PromiseInterface getOrganizationIntelligenceConfigAsync(GetOrganizationIntelligenceConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getProjectIntelligenceConfigAsync(GetProjectIntelligenceConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getStorageLayoutAsync(GetStorageLayoutRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAnywhereCachesAsync(ListAnywhereCachesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listFoldersAsync(ListFoldersRequest $request, array $optionalArgs = []) - * @method PromiseInterface listManagedFoldersAsync(ListManagedFoldersRequest $request, array $optionalArgs = []) - * @method PromiseInterface pauseAnywhereCacheAsync(PauseAnywhereCacheRequest $request, array $optionalArgs = []) - * @method PromiseInterface renameFolderAsync(RenameFolderRequest $request, array $optionalArgs = []) - * @method PromiseInterface resumeAnywhereCacheAsync(ResumeAnywhereCacheRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateAnywhereCacheAsync(UpdateAnywhereCacheRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateFolderIntelligenceConfigAsync(UpdateFolderIntelligenceConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateOrganizationIntelligenceConfigAsync(UpdateOrganizationIntelligenceConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateProjectIntelligenceConfigAsync(UpdateProjectIntelligenceConfigRequest $request, array $optionalArgs = []) - */ -final class StorageControlClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.storage.control.v2.StorageControl'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'storage.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'storage.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloud-platform.read-only', - 'https://www.googleapis.com/auth/devstorage.full_control', - 'https://www.googleapis.com/auth/devstorage.read_only', - 'https://www.googleapis.com/auth/devstorage.read_write', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/storage_control_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/storage_control_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/storage_control_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/storage_control_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 = $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 - * anywhere_cache resource. - * - * @param string $project - * @param string $bucket - * @param string $anywhereCache - * - * @return string The formatted anywhere_cache resource. - */ - public static function anywhereCacheName(string $project, string $bucket, string $anywhereCache): string - { - return self::getPathTemplate('anywhereCache')->render([ - 'project' => $project, - 'bucket' => $bucket, - 'anywhere_cache' => $anywhereCache, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a bucket - * resource. - * - * @param string $project - * @param string $bucket - * - * @return string The formatted bucket resource. - */ - public static function bucketName(string $project, string $bucket): string - { - return self::getPathTemplate('bucket')->render([ - 'project' => $project, - 'bucket' => $bucket, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a folder - * resource. - * - * @param string $project - * @param string $bucket - * @param string $folder - * - * @return string The formatted folder resource. - */ - public static function folderName(string $project, string $bucket, string $folder): string - { - return self::getPathTemplate('folder')->render([ - 'project' => $project, - 'bucket' => $bucket, - 'folder' => $folder, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_location_intelligenceConfig resource. - * - * @param string $folder - * @param string $location - * - * @return string The formatted folder_location_intelligenceConfig resource. - */ - public static function folderLocationIntelligenceConfigName(string $folder, string $location): string - { - return self::getPathTemplate('folderLocationIntelligenceConfig')->render([ - 'folder' => $folder, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * intelligence_config resource. - * - * @param string $folder - * @param string $location - * - * @return string The formatted intelligence_config resource. - */ - public static function intelligenceConfigName(string $folder, string $location): string - { - return self::getPathTemplate('intelligenceConfig')->render([ - 'folder' => $folder, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * managed_folder resource. - * - * @param string $project - * @param string $bucket - * @param string $managedFolder - * - * @return string The formatted managed_folder resource. - */ - public static function managedFolderName(string $project, string $bucket, string $managedFolder): string - { - return self::getPathTemplate('managedFolder')->render([ - 'project' => $project, - 'bucket' => $bucket, - 'managed_folder' => $managedFolder, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * org_location_intelligenceConfig resource. - * - * @param string $org - * @param string $location - * - * @return string The formatted org_location_intelligenceConfig resource. - */ - public static function orgLocationIntelligenceConfigName(string $org, string $location): string - { - return self::getPathTemplate('orgLocationIntelligenceConfig')->render([ - 'org' => $org, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_intelligenceConfig resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted project_location_intelligenceConfig resource. - */ - public static function projectLocationIntelligenceConfigName(string $project, string $location): string - { - return self::getPathTemplate('projectLocationIntelligenceConfig')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * storage_layout resource. - * - * @param string $project - * @param string $bucket - * - * @return string The formatted storage_layout resource. - */ - public static function storageLayoutName(string $project, string $bucket): string - { - return self::getPathTemplate('storageLayout')->render([ - 'project' => $project, - 'bucket' => $bucket, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - anywhereCache: projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache} - * - bucket: projects/{project}/buckets/{bucket} - * - folder: projects/{project}/buckets/{bucket}/folders/{folder=**} - * - folderLocationIntelligenceConfig: folders/{folder}/locations/{location}/intelligenceConfig - * - intelligenceConfig: folders/{folder}/locations/{location}/intelligenceConfig - * - managedFolder: projects/{project}/buckets/{bucket}/managedFolders/{managed_folder=**} - * - orgLocationIntelligenceConfig: organizations/{org}/locations/{location}/intelligenceConfig - * - projectLocationIntelligenceConfig: projects/{project}/locations/{location}/intelligenceConfig - * - storageLayout: projects/{project}/buckets/{bucket}/storageLayout - * - * 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|ClientOptions $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 'storage.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Storage\Control\V2\StorageControlClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new StorageControlClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $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 an Anywhere Cache instance. - * - * The async variant is {@see StorageControlClient::createAnywhereCacheAsync()} . - * - * @example samples/V2/StorageControlClient/create_anywhere_cache.php - * - * @param CreateAnywhereCacheRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createAnywhereCache(CreateAnywhereCacheRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateAnywhereCache', $request, $callOptions)->wait(); - } - - /** - * Creates a new folder. This operation is only applicable to a hierarchical - * namespace enabled bucket. - * - * The async variant is {@see StorageControlClient::createFolderAsync()} . - * - * @example samples/V2/StorageControlClient/create_folder.php - * - * @param CreateFolderRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Folder - * - * @throws ApiException Thrown if the API call fails. - */ - public function createFolder(CreateFolderRequest $request, array $callOptions = []): Folder - { - return $this->startApiCall('CreateFolder', $request, $callOptions)->wait(); - } - - /** - * Creates a new managed folder. - * - * The async variant is {@see StorageControlClient::createManagedFolderAsync()} . - * - * @example samples/V2/StorageControlClient/create_managed_folder.php - * - * @param CreateManagedFolderRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ManagedFolder - * - * @throws ApiException Thrown if the API call fails. - */ - public function createManagedFolder(CreateManagedFolderRequest $request, array $callOptions = []): ManagedFolder - { - return $this->startApiCall('CreateManagedFolder', $request, $callOptions)->wait(); - } - - /** - * Permanently deletes an empty folder. This operation is only applicable to a - * hierarchical namespace enabled bucket. - * - * The async variant is {@see StorageControlClient::deleteFolderAsync()} . - * - * @example samples/V2/StorageControlClient/delete_folder.php - * - * @param DeleteFolderRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteFolder(DeleteFolderRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteFolder', $request, $callOptions)->wait(); - } - - /** - * Deletes a folder recursively. This operation is only applicable to a - * hierarchical namespace enabled bucket. - * - * The async variant is {@see StorageControlClient::deleteFolderRecursiveAsync()} . - * - * @example samples/V2/StorageControlClient/delete_folder_recursive.php - * - * @param DeleteFolderRecursiveRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteFolderRecursive(DeleteFolderRecursiveRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteFolderRecursive', $request, $callOptions)->wait(); - } - - /** - * Permanently deletes an empty managed folder. - * - * The async variant is {@see StorageControlClient::deleteManagedFolderAsync()} . - * - * @example samples/V2/StorageControlClient/delete_managed_folder.php - * - * @param DeleteManagedFolderRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteManagedFolder(DeleteManagedFolderRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteManagedFolder', $request, $callOptions)->wait(); - } - - /** - * Disables an Anywhere Cache instance. A disabled instance is read-only. The - * disablement could be revoked by calling ResumeAnywhereCache. The cache - * instance will be deleted automatically if it remains in the disabled state - * for at least one hour. - * - * The async variant is {@see StorageControlClient::disableAnywhereCacheAsync()} . - * - * @example samples/V2/StorageControlClient/disable_anywhere_cache.php - * - * @param DisableAnywhereCacheRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AnywhereCache - * - * @throws ApiException Thrown if the API call fails. - */ - public function disableAnywhereCache(DisableAnywhereCacheRequest $request, array $callOptions = []): AnywhereCache - { - return $this->startApiCall('DisableAnywhereCache', $request, $callOptions)->wait(); - } - - /** - * Gets an Anywhere Cache instance. - * - * The async variant is {@see StorageControlClient::getAnywhereCacheAsync()} . - * - * @example samples/V2/StorageControlClient/get_anywhere_cache.php - * - * @param GetAnywhereCacheRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AnywhereCache - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAnywhereCache(GetAnywhereCacheRequest $request, array $callOptions = []): AnywhereCache - { - return $this->startApiCall('GetAnywhereCache', $request, $callOptions)->wait(); - } - - /** - * Returns metadata for the specified folder. This operation is only - * applicable to a hierarchical namespace enabled bucket. - * - * The async variant is {@see StorageControlClient::getFolderAsync()} . - * - * @example samples/V2/StorageControlClient/get_folder.php - * - * @param GetFolderRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Folder - * - * @throws ApiException Thrown if the API call fails. - */ - public function getFolder(GetFolderRequest $request, array $callOptions = []): Folder - { - return $this->startApiCall('GetFolder', $request, $callOptions)->wait(); - } - - /** - * Returns the Folder scoped singleton IntelligenceConfig resource. - * - * The async variant is - * {@see StorageControlClient::getFolderIntelligenceConfigAsync()} . - * - * @example samples/V2/StorageControlClient/get_folder_intelligence_config.php - * - * @param GetFolderIntelligenceConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return IntelligenceConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function getFolderIntelligenceConfig(GetFolderIntelligenceConfigRequest $request, array $callOptions = []): IntelligenceConfig - { - return $this->startApiCall('GetFolderIntelligenceConfig', $request, $callOptions)->wait(); - } - - /** - * Gets the IAM policy for a specified bucket. - * The `resource` field in the request should be - * `projects/_/buckets/{bucket}` for a bucket, or - * `projects/_/buckets/{bucket}/managedFolders/{managedFolder}` - * for a managed folder. - * - * The async variant is {@see StorageControlClient::getIamPolicyAsync()} . - * - * @example samples/V2/StorageControlClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns metadata for the specified managed folder. - * - * The async variant is {@see StorageControlClient::getManagedFolderAsync()} . - * - * @example samples/V2/StorageControlClient/get_managed_folder.php - * - * @param GetManagedFolderRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ManagedFolder - * - * @throws ApiException Thrown if the API call fails. - */ - public function getManagedFolder(GetManagedFolderRequest $request, array $callOptions = []): ManagedFolder - { - return $this->startApiCall('GetManagedFolder', $request, $callOptions)->wait(); - } - - /** - * Returns the Organization scoped singleton IntelligenceConfig resource. - * - * The async variant is - * {@see StorageControlClient::getOrganizationIntelligenceConfigAsync()} . - * - * @example samples/V2/StorageControlClient/get_organization_intelligence_config.php - * - * @param GetOrganizationIntelligenceConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return IntelligenceConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function getOrganizationIntelligenceConfig(GetOrganizationIntelligenceConfigRequest $request, array $callOptions = []): IntelligenceConfig - { - return $this->startApiCall('GetOrganizationIntelligenceConfig', $request, $callOptions)->wait(); - } - - /** - * Returns the Project scoped singleton IntelligenceConfig resource. - * - * The async variant is - * {@see StorageControlClient::getProjectIntelligenceConfigAsync()} . - * - * @example samples/V2/StorageControlClient/get_project_intelligence_config.php - * - * @param GetProjectIntelligenceConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return IntelligenceConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function getProjectIntelligenceConfig(GetProjectIntelligenceConfigRequest $request, array $callOptions = []): IntelligenceConfig - { - return $this->startApiCall('GetProjectIntelligenceConfig', $request, $callOptions)->wait(); - } - - /** - * Returns the storage layout configuration for a given bucket. - * - * The async variant is {@see StorageControlClient::getStorageLayoutAsync()} . - * - * @example samples/V2/StorageControlClient/get_storage_layout.php - * - * @param GetStorageLayoutRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return StorageLayout - * - * @throws ApiException Thrown if the API call fails. - */ - public function getStorageLayout(GetStorageLayoutRequest $request, array $callOptions = []): StorageLayout - { - return $this->startApiCall('GetStorageLayout', $request, $callOptions)->wait(); - } - - /** - * Lists Anywhere Cache instances for a given bucket. - * - * The async variant is {@see StorageControlClient::listAnywhereCachesAsync()} . - * - * @example samples/V2/StorageControlClient/list_anywhere_caches.php - * - * @param ListAnywhereCachesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listAnywhereCaches(ListAnywhereCachesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAnywhereCaches', $request, $callOptions); - } - - /** - * Retrieves a list of folders. This operation is only applicable to a - * hierarchical namespace enabled bucket. - * - * The async variant is {@see StorageControlClient::listFoldersAsync()} . - * - * @example samples/V2/StorageControlClient/list_folders.php - * - * @param ListFoldersRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listFolders(ListFoldersRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListFolders', $request, $callOptions); - } - - /** - * Retrieves a list of managed folders for a given bucket. - * - * The async variant is {@see StorageControlClient::listManagedFoldersAsync()} . - * - * @example samples/V2/StorageControlClient/list_managed_folders.php - * - * @param ListManagedFoldersRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listManagedFolders(ListManagedFoldersRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListManagedFolders', $request, $callOptions); - } - - /** - * Pauses an Anywhere Cache instance. - * - * The async variant is {@see StorageControlClient::pauseAnywhereCacheAsync()} . - * - * @example samples/V2/StorageControlClient/pause_anywhere_cache.php - * - * @param PauseAnywhereCacheRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AnywhereCache - * - * @throws ApiException Thrown if the API call fails. - */ - public function pauseAnywhereCache(PauseAnywhereCacheRequest $request, array $callOptions = []): AnywhereCache - { - return $this->startApiCall('PauseAnywhereCache', $request, $callOptions)->wait(); - } - - /** - * Renames a source folder to a destination folder. This operation is only - * applicable to a hierarchical namespace enabled bucket. During a rename, the - * source and destination folders are locked until the long running operation - * completes. - * - * The async variant is {@see StorageControlClient::renameFolderAsync()} . - * - * @example samples/V2/StorageControlClient/rename_folder.php - * - * @param RenameFolderRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function renameFolder(RenameFolderRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RenameFolder', $request, $callOptions)->wait(); - } - - /** - * Resumes a disabled or paused Anywhere Cache instance. - * - * The async variant is {@see StorageControlClient::resumeAnywhereCacheAsync()} . - * - * @example samples/V2/StorageControlClient/resume_anywhere_cache.php - * - * @param ResumeAnywhereCacheRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AnywhereCache - * - * @throws ApiException Thrown if the API call fails. - */ - public function resumeAnywhereCache(ResumeAnywhereCacheRequest $request, array $callOptions = []): AnywhereCache - { - return $this->startApiCall('ResumeAnywhereCache', $request, $callOptions)->wait(); - } - - /** - * Updates an IAM policy for the specified bucket. - * The `resource` field in the request should be - * `projects/_/buckets/{bucket}` for a bucket, or - * `projects/_/buckets/{bucket}/managedFolders/{managedFolder}` - * for a managed folder. - * - * The async variant is {@see StorageControlClient::setIamPolicyAsync()} . - * - * @example samples/V2/StorageControlClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Tests a set of permissions on the given bucket, object, or managed folder - * to see which, if any, are held by the caller. - * The `resource` field in the request should be - * `projects/_/buckets/{bucket}` for a bucket, - * `projects/_/buckets/{bucket}/objects/{object}` for an object, or - * `projects/_/buckets/{bucket}/managedFolders/{managedFolder}` - * for a managed folder. - * - * The async variant is {@see StorageControlClient::testIamPermissionsAsync()} . - * - * @example samples/V2/StorageControlClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } - - /** - * Updates an Anywhere Cache instance. Mutable fields include `ttl` and - * `admission_policy`. - * - * The async variant is {@see StorageControlClient::updateAnywhereCacheAsync()} . - * - * @example samples/V2/StorageControlClient/update_anywhere_cache.php - * - * @param UpdateAnywhereCacheRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateAnywhereCache(UpdateAnywhereCacheRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateAnywhereCache', $request, $callOptions)->wait(); - } - - /** - * Updates the Folder scoped singleton IntelligenceConfig resource. - * - * The async variant is - * {@see StorageControlClient::updateFolderIntelligenceConfigAsync()} . - * - * @example samples/V2/StorageControlClient/update_folder_intelligence_config.php - * - * @param UpdateFolderIntelligenceConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return IntelligenceConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateFolderIntelligenceConfig(UpdateFolderIntelligenceConfigRequest $request, array $callOptions = []): IntelligenceConfig - { - return $this->startApiCall('UpdateFolderIntelligenceConfig', $request, $callOptions)->wait(); - } - - /** - * Updates the Organization scoped singleton IntelligenceConfig resource. - * - * The async variant is - * {@see StorageControlClient::updateOrganizationIntelligenceConfigAsync()} . - * - * @example samples/V2/StorageControlClient/update_organization_intelligence_config.php - * - * @param UpdateOrganizationIntelligenceConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return IntelligenceConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateOrganizationIntelligenceConfig(UpdateOrganizationIntelligenceConfigRequest $request, array $callOptions = []): IntelligenceConfig - { - return $this->startApiCall('UpdateOrganizationIntelligenceConfig', $request, $callOptions)->wait(); - } - - /** - * Updates the Project scoped singleton IntelligenceConfig resource. - * - * The async variant is - * {@see StorageControlClient::updateProjectIntelligenceConfigAsync()} . - * - * @example samples/V2/StorageControlClient/update_project_intelligence_config.php - * - * @param UpdateProjectIntelligenceConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return IntelligenceConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateProjectIntelligenceConfig(UpdateProjectIntelligenceConfigRequest $request, array $callOptions = []): IntelligenceConfig - { - return $this->startApiCall('UpdateProjectIntelligenceConfig', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/StorageControl/v2/src/V2/gapic_metadata.json b/owl-bot-staging/StorageControl/v2/src/V2/gapic_metadata.json deleted file mode 100644 index 86b444f90e16..000000000000 --- a/owl-bot-staging/StorageControl/v2/src/V2/gapic_metadata.json +++ /dev/null @@ -1,153 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.storage.control.v2", - "libraryPackage": "Google\\Cloud\\Storage\\Control\\V2", - "services": { - "StorageControl": { - "clients": { - "grpc": { - "libraryClient": "StorageControlGapicClient", - "rpcs": { - "CreateAnywhereCache": { - "methods": [ - "createAnywhereCache" - ] - }, - "CreateFolder": { - "methods": [ - "createFolder" - ] - }, - "CreateManagedFolder": { - "methods": [ - "createManagedFolder" - ] - }, - "DeleteFolder": { - "methods": [ - "deleteFolder" - ] - }, - "DeleteFolderRecursive": { - "methods": [ - "deleteFolderRecursive" - ] - }, - "DeleteManagedFolder": { - "methods": [ - "deleteManagedFolder" - ] - }, - "DisableAnywhereCache": { - "methods": [ - "disableAnywhereCache" - ] - }, - "GetAnywhereCache": { - "methods": [ - "getAnywhereCache" - ] - }, - "GetFolder": { - "methods": [ - "getFolder" - ] - }, - "GetFolderIntelligenceConfig": { - "methods": [ - "getFolderIntelligenceConfig" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "GetManagedFolder": { - "methods": [ - "getManagedFolder" - ] - }, - "GetOrganizationIntelligenceConfig": { - "methods": [ - "getOrganizationIntelligenceConfig" - ] - }, - "GetProjectIntelligenceConfig": { - "methods": [ - "getProjectIntelligenceConfig" - ] - }, - "GetStorageLayout": { - "methods": [ - "getStorageLayout" - ] - }, - "ListAnywhereCaches": { - "methods": [ - "listAnywhereCaches" - ] - }, - "ListFolders": { - "methods": [ - "listFolders" - ] - }, - "ListManagedFolders": { - "methods": [ - "listManagedFolders" - ] - }, - "PauseAnywhereCache": { - "methods": [ - "pauseAnywhereCache" - ] - }, - "RenameFolder": { - "methods": [ - "renameFolder" - ] - }, - "ResumeAnywhereCache": { - "methods": [ - "resumeAnywhereCache" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "UpdateAnywhereCache": { - "methods": [ - "updateAnywhereCache" - ] - }, - "UpdateFolderIntelligenceConfig": { - "methods": [ - "updateFolderIntelligenceConfig" - ] - }, - "UpdateOrganizationIntelligenceConfig": { - "methods": [ - "updateOrganizationIntelligenceConfig" - ] - }, - "UpdateProjectIntelligenceConfig": { - "methods": [ - "updateProjectIntelligenceConfig" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_client_config.json b/owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_client_config.json deleted file mode 100644 index 93b69f4f75bf..000000000000 --- a/owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_client_config.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "interfaces": { - "google.storage.control.v2.StorageControl": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "RESOURCE_EXHAUSTED", - "UNAVAILABLE", - "DEADLINE_EXCEEDED", - "INTERNAL", - "UNKNOWN" - ], - "no_retry_1_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 2.0, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateAnywhereCache": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateFolder": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateManagedFolder": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteFolder": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteFolderRecursive": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteManagedFolder": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DisableAnywhereCache": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetAnywhereCache": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetFolder": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetFolderIntelligenceConfig": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetManagedFolder": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetOrganizationIntelligenceConfig": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetProjectIntelligenceConfig": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetStorageLayout": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListAnywhereCaches": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListFolders": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListManagedFolders": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "PauseAnywhereCache": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "RenameFolder": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ResumeAnywhereCache": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateAnywhereCache": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateFolderIntelligenceConfig": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateOrganizationIntelligenceConfig": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateProjectIntelligenceConfig": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_descriptor_config.php b/owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_descriptor_config.php deleted file mode 100644 index 33d26bc94c31..000000000000 --- a/owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_descriptor_config.php +++ /dev/null @@ -1,516 +0,0 @@ - [ - 'google.storage.control.v2.StorageControl' => [ - 'CreateAnywhereCache' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Storage\Control\V2\AnywhereCache', - 'metadataReturnType' => '\Google\Cloud\Storage\Control\V2\CreateAnywhereCacheMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'bucket', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - 'autoPopulatedFields' => [ - 'requestId' => \Google\Api\FieldInfo\Format::UUID4, - ], - ], - 'DeleteFolderRecursive' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Storage\Control\V2\DeleteFolderRecursiveMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'bucket', - 'fieldAccessors' => [ - 'getName', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', - ], - ], - ], - 'autoPopulatedFields' => [ - 'requestId' => \Google\Api\FieldInfo\Format::UUID4, - ], - ], - 'RenameFolder' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Storage\Control\V2\Folder', - 'metadataReturnType' => '\Google\Cloud\Storage\Control\V2\RenameFolderMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'bucket', - 'fieldAccessors' => [ - 'getName', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', - ], - ], - ], - 'autoPopulatedFields' => [ - 'requestId' => \Google\Api\FieldInfo\Format::UUID4, - ], - ], - 'UpdateAnywhereCache' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Storage\Control\V2\AnywhereCache', - 'metadataReturnType' => '\Google\Cloud\Storage\Control\V2\UpdateAnywhereCacheMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'bucket', - 'fieldAccessors' => [ - 'getAnywhereCache', - 'getName', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', - ], - ], - ], - 'autoPopulatedFields' => [ - 'requestId' => \Google\Api\FieldInfo\Format::UUID4, - ], - ], - 'CreateFolder' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Storage\Control\V2\Folder', - 'headerParams' => [ - [ - 'keyName' => 'bucket', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - 'autoPopulatedFields' => [ - 'requestId' => \Google\Api\FieldInfo\Format::UUID4, - ], - ], - 'CreateManagedFolder' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Storage\Control\V2\ManagedFolder', - 'headerParams' => [ - [ - 'keyName' => 'bucket', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - 'autoPopulatedFields' => [ - 'requestId' => \Google\Api\FieldInfo\Format::UUID4, - ], - ], - 'DeleteFolder' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'bucket', - 'fieldAccessors' => [ - 'getName', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', - ], - ], - ], - 'autoPopulatedFields' => [ - 'requestId' => \Google\Api\FieldInfo\Format::UUID4, - ], - ], - 'DeleteManagedFolder' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'bucket', - 'fieldAccessors' => [ - 'getName', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', - ], - ], - ], - 'autoPopulatedFields' => [ - 'requestId' => \Google\Api\FieldInfo\Format::UUID4, - ], - ], - 'DisableAnywhereCache' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Storage\Control\V2\AnywhereCache', - 'headerParams' => [ - [ - 'keyName' => 'bucket', - 'fieldAccessors' => [ - 'getName', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', - ], - ], - ], - 'autoPopulatedFields' => [ - 'requestId' => \Google\Api\FieldInfo\Format::UUID4, - ], - ], - 'GetAnywhereCache' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Storage\Control\V2\AnywhereCache', - 'headerParams' => [ - [ - 'keyName' => 'bucket', - 'fieldAccessors' => [ - 'getName', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', - ], - ], - ], - 'autoPopulatedFields' => [ - 'requestId' => \Google\Api\FieldInfo\Format::UUID4, - ], - ], - 'GetFolder' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Storage\Control\V2\Folder', - 'headerParams' => [ - [ - 'keyName' => 'bucket', - 'fieldAccessors' => [ - 'getName', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', - ], - ], - ], - 'autoPopulatedFields' => [ - 'requestId' => \Google\Api\FieldInfo\Format::UUID4, - ], - ], - 'GetFolderIntelligenceConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Storage\Control\V2\IntelligenceConfig', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'bucket', - 'fieldAccessors' => [ - 'getResource', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', - ], - ], - ], - ], - 'GetManagedFolder' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Storage\Control\V2\ManagedFolder', - 'headerParams' => [ - [ - 'keyName' => 'bucket', - 'fieldAccessors' => [ - 'getName', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', - ], - ], - ], - 'autoPopulatedFields' => [ - 'requestId' => \Google\Api\FieldInfo\Format::UUID4, - ], - ], - 'GetOrganizationIntelligenceConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Storage\Control\V2\IntelligenceConfig', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetProjectIntelligenceConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Storage\Control\V2\IntelligenceConfig', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetStorageLayout' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Storage\Control\V2\StorageLayout', - 'headerParams' => [ - [ - 'keyName' => 'bucket', - 'fieldAccessors' => [ - 'getName', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', - ], - ], - ], - 'autoPopulatedFields' => [ - 'requestId' => \Google\Api\FieldInfo\Format::UUID4, - ], - ], - 'ListAnywhereCaches' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAnywhereCaches', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Storage\Control\V2\ListAnywhereCachesResponse', - 'headerParams' => [ - [ - 'keyName' => 'bucket', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - 'autoPopulatedFields' => [ - 'requestId' => \Google\Api\FieldInfo\Format::UUID4, - ], - ], - 'ListFolders' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getFolders', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Storage\Control\V2\ListFoldersResponse', - 'headerParams' => [ - [ - 'keyName' => 'bucket', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListManagedFolders' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getManagedFolders', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Storage\Control\V2\ListManagedFoldersResponse', - 'headerParams' => [ - [ - 'keyName' => 'bucket', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - 'autoPopulatedFields' => [ - 'requestId' => \Google\Api\FieldInfo\Format::UUID4, - ], - ], - 'PauseAnywhereCache' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Storage\Control\V2\AnywhereCache', - 'headerParams' => [ - [ - 'keyName' => 'bucket', - 'fieldAccessors' => [ - 'getName', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', - ], - ], - ], - 'autoPopulatedFields' => [ - 'requestId' => \Google\Api\FieldInfo\Format::UUID4, - ], - ], - 'ResumeAnywhereCache' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Storage\Control\V2\AnywhereCache', - 'headerParams' => [ - [ - 'keyName' => 'bucket', - 'fieldAccessors' => [ - 'getName', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', - ], - ], - ], - 'autoPopulatedFields' => [ - 'requestId' => \Google\Api\FieldInfo\Format::UUID4, - ], - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'bucket', - 'fieldAccessors' => [ - 'getResource', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/buckets\/[^\/]+)(?:\/.*)?$/', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'bucket', - 'fieldAccessors' => [ - 'getResource', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/buckets\/[^\/]+)\/objects(?:\/.*)?$/', - '/^(?projects\/[^\/]+\/buckets\/[^\/]+)\/managedFolders(?:\/.*)?$/', - ], - ], - ], - ], - 'UpdateFolderIntelligenceConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Storage\Control\V2\IntelligenceConfig', - 'headerParams' => [ - [ - 'keyName' => 'intelligence_config.name', - 'fieldAccessors' => [ - 'getIntelligenceConfig', - 'getName', - ], - ], - ], - ], - 'UpdateOrganizationIntelligenceConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Storage\Control\V2\IntelligenceConfig', - 'headerParams' => [ - [ - 'keyName' => 'intelligence_config.name', - 'fieldAccessors' => [ - 'getIntelligenceConfig', - 'getName', - ], - ], - ], - ], - 'UpdateProjectIntelligenceConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Storage\Control\V2\IntelligenceConfig', - 'headerParams' => [ - [ - 'keyName' => 'intelligence_config.name', - 'fieldAccessors' => [ - 'getIntelligenceConfig', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'anywhereCache' => 'projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}', - 'bucket' => 'projects/{project}/buckets/{bucket}', - 'folder' => 'projects/{project}/buckets/{bucket}/folders/{folder=**}', - 'folderLocationIntelligenceConfig' => 'folders/{folder}/locations/{location}/intelligenceConfig', - 'intelligenceConfig' => 'folders/{folder}/locations/{location}/intelligenceConfig', - 'managedFolder' => 'projects/{project}/buckets/{bucket}/managedFolders/{managed_folder=**}', - 'orgLocationIntelligenceConfig' => 'organizations/{org}/locations/{location}/intelligenceConfig', - 'projectLocationIntelligenceConfig' => 'projects/{project}/locations/{location}/intelligenceConfig', - 'storageLayout' => 'projects/{project}/buckets/{bucket}/storageLayout', - ], - ], - ], -]; diff --git a/owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_rest_client_config.php b/owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_rest_client_config.php deleted file mode 100644 index f77f4c34fc52..000000000000 --- a/owl-bot-staging/StorageControl/v2/src/V2/resources/storage_control_rest_client_config.php +++ /dev/null @@ -1,109 +0,0 @@ - [ - 'google.storage.control.v2.StorageControl' => [ - 'GetFolderIntelligenceConfig' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=folders/*/locations/*/intelligenceConfig}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOrganizationIntelligenceConfig' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=organizations/*/locations/*/intelligenceConfig}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetProjectIntelligenceConfig' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/intelligenceConfig}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateFolderIntelligenceConfig' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{intelligence_config.name=folders/*/locations/*/intelligenceConfig}', - 'body' => 'intelligence_config', - 'placeholders' => [ - 'intelligence_config.name' => [ - 'getters' => [ - 'getIntelligenceConfig', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateOrganizationIntelligenceConfig' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{intelligence_config.name=organizations/*/locations/*/intelligenceConfig}', - 'body' => 'intelligence_config', - 'placeholders' => [ - 'intelligence_config.name' => [ - 'getters' => [ - 'getIntelligenceConfig', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateProjectIntelligenceConfig' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{intelligence_config.name=projects/*/locations/*/intelligenceConfig}', - 'body' => 'intelligence_config', - 'placeholders' => [ - 'intelligence_config.name' => [ - 'getters' => [ - 'getIntelligenceConfig', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/StorageControl/v2/tests/Unit/V2/Client/StorageControlClientTest.php b/owl-bot-staging/StorageControl/v2/tests/Unit/V2/Client/StorageControlClientTest.php deleted file mode 100644 index 882f048c53e5..000000000000 --- a/owl-bot-staging/StorageControl/v2/tests/Unit/V2/Client/StorageControlClientTest.php +++ /dev/null @@ -1,2297 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return StorageControlClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new StorageControlClient($options); - } - - /** @test */ - public function createAnywhereCacheTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAnywhereCacheTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $zone = 'zone3744684'; - $admissionPolicy = 'admissionPolicy1847270952'; - $state = 'state109757585'; - $pendingUpdate = false; - $expectedResponse = new AnywhereCache(); - $expectedResponse->setName($name); - $expectedResponse->setZone($zone); - $expectedResponse->setAdmissionPolicy($admissionPolicy); - $expectedResponse->setState($state); - $expectedResponse->setPendingUpdate($pendingUpdate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAnywhereCacheTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); - $anywhereCache = new AnywhereCache(); - $request = (new CreateAnywhereCacheRequest()) - ->setParent($formattedParent) - ->setAnywhereCache($anywhereCache); - $response = $gapicClient->createAnywhereCache($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.storage.control.v2.StorageControl/CreateAnywhereCache', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAnywhereCache(); - $this->assertProtobufEquals($anywhereCache, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAnywhereCacheTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createAnywhereCacheExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAnywhereCacheTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->bucketName('[PROJECT]', '[BUCKET]'); - $anywhereCache = new AnywhereCache(); - $request = (new CreateAnywhereCacheRequest()) - ->setParent($formattedParent) - ->setAnywhereCache($anywhereCache); - $response = $gapicClient->createAnywhereCache($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAnywhereCacheTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createFolderTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $metageneration = 1048558813; - $expectedResponse = new Folder(); - $expectedResponse->setName($name); - $expectedResponse->setMetageneration($metageneration); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); - $folder = new Folder(); - $folderId = 'folderId527488652'; - $request = (new CreateFolderRequest()) - ->setParent($formattedParent) - ->setFolder($folder) - ->setFolderId($folderId); - $response = $gapicClient->createFolder($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storage.control.v2.StorageControl/CreateFolder', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getFolder(); - $this->assertProtobufEquals($folder, $actualValue); - $actualValue = $actualRequestObject->getFolderId(); - $this->assertProtobufEquals($folderId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createFolderExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); - $folder = new Folder(); - $folderId = 'folderId527488652'; - $request = (new CreateFolderRequest()) - ->setParent($formattedParent) - ->setFolder($folder) - ->setFolderId($folderId); - try { - $gapicClient->createFolder($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createManagedFolderTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $metageneration = 1048558813; - $expectedResponse = new ManagedFolder(); - $expectedResponse->setName($name); - $expectedResponse->setMetageneration($metageneration); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); - $managedFolder = new ManagedFolder(); - $managedFolderId = 'managedFolderId-239131156'; - $request = (new CreateManagedFolderRequest()) - ->setParent($formattedParent) - ->setManagedFolder($managedFolder) - ->setManagedFolderId($managedFolderId); - $response = $gapicClient->createManagedFolder($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storage.control.v2.StorageControl/CreateManagedFolder', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getManagedFolder(); - $this->assertProtobufEquals($managedFolder, $actualValue); - $actualValue = $actualRequestObject->getManagedFolderId(); - $this->assertProtobufEquals($managedFolderId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createManagedFolderExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); - $managedFolder = new ManagedFolder(); - $managedFolderId = 'managedFolderId-239131156'; - $request = (new CreateManagedFolderRequest()) - ->setParent($formattedParent) - ->setManagedFolder($managedFolder) - ->setManagedFolderId($managedFolderId); - try { - $gapicClient->createManagedFolder($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteFolderTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); - $request = (new DeleteFolderRequest()) - ->setName($formattedName); - $gapicClient->deleteFolder($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storage.control.v2.StorageControl/DeleteFolder', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteFolderExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); - $request = (new DeleteFolderRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteFolder($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteFolderRecursiveTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteFolderRecursiveTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteFolderRecursiveTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); - $request = (new DeleteFolderRecursiveRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteFolderRecursive($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.storage.control.v2.StorageControl/DeleteFolderRecursive', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteFolderRecursiveTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteFolderRecursiveExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteFolderRecursiveTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); - $request = (new DeleteFolderRecursiveRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteFolderRecursive($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteFolderRecursiveTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteManagedFolderTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->managedFolderName('[PROJECT]', '[BUCKET]', '[MANAGED_FOLDER]'); - $request = (new DeleteManagedFolderRequest()) - ->setName($formattedName); - $gapicClient->deleteManagedFolder($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storage.control.v2.StorageControl/DeleteManagedFolder', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteManagedFolderExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->managedFolderName('[PROJECT]', '[BUCKET]', '[MANAGED_FOLDER]'); - $request = (new DeleteManagedFolderRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteManagedFolder($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function disableAnywhereCacheTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $zone = 'zone3744684'; - $admissionPolicy = 'admissionPolicy1847270952'; - $state = 'state109757585'; - $pendingUpdate = false; - $expectedResponse = new AnywhereCache(); - $expectedResponse->setName($name2); - $expectedResponse->setZone($zone); - $expectedResponse->setAdmissionPolicy($admissionPolicy); - $expectedResponse->setState($state); - $expectedResponse->setPendingUpdate($pendingUpdate); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->anywhereCacheName('[PROJECT]', '[BUCKET]', '[ANYWHERE_CACHE]'); - $request = (new DisableAnywhereCacheRequest()) - ->setName($formattedName); - $response = $gapicClient->disableAnywhereCache($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storage.control.v2.StorageControl/DisableAnywhereCache', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function disableAnywhereCacheExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->anywhereCacheName('[PROJECT]', '[BUCKET]', '[ANYWHERE_CACHE]'); - $request = (new DisableAnywhereCacheRequest()) - ->setName($formattedName); - try { - $gapicClient->disableAnywhereCache($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAnywhereCacheTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $zone = 'zone3744684'; - $admissionPolicy = 'admissionPolicy1847270952'; - $state = 'state109757585'; - $pendingUpdate = false; - $expectedResponse = new AnywhereCache(); - $expectedResponse->setName($name2); - $expectedResponse->setZone($zone); - $expectedResponse->setAdmissionPolicy($admissionPolicy); - $expectedResponse->setState($state); - $expectedResponse->setPendingUpdate($pendingUpdate); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->anywhereCacheName('[PROJECT]', '[BUCKET]', '[ANYWHERE_CACHE]'); - $request = (new GetAnywhereCacheRequest()) - ->setName($formattedName); - $response = $gapicClient->getAnywhereCache($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storage.control.v2.StorageControl/GetAnywhereCache', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAnywhereCacheExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->anywhereCacheName('[PROJECT]', '[BUCKET]', '[ANYWHERE_CACHE]'); - $request = (new GetAnywhereCacheRequest()) - ->setName($formattedName); - try { - $gapicClient->getAnywhereCache($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getFolderTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $metageneration = 1048558813; - $expectedResponse = new Folder(); - $expectedResponse->setName($name2); - $expectedResponse->setMetageneration($metageneration); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); - $request = (new GetFolderRequest()) - ->setName($formattedName); - $response = $gapicClient->getFolder($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storage.control.v2.StorageControl/GetFolder', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getFolderExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); - $request = (new GetFolderRequest()) - ->setName($formattedName); - try { - $gapicClient->getFolder($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getFolderIntelligenceConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new IntelligenceConfig(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->intelligenceConfigName('[FOLDER]', '[LOCATION]'); - $request = (new GetFolderIntelligenceConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->getFolderIntelligenceConfig($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storage.control.v2.StorageControl/GetFolderIntelligenceConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getFolderIntelligenceConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->intelligenceConfigName('[FOLDER]', '[LOCATION]'); - $request = (new GetFolderIntelligenceConfigRequest()) - ->setName($formattedName); - try { - $gapicClient->getFolderIntelligenceConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storage.control.v2.StorageControl/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getManagedFolderTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $metageneration = 1048558813; - $expectedResponse = new ManagedFolder(); - $expectedResponse->setName($name2); - $expectedResponse->setMetageneration($metageneration); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->managedFolderName('[PROJECT]', '[BUCKET]', '[MANAGED_FOLDER]'); - $request = (new GetManagedFolderRequest()) - ->setName($formattedName); - $response = $gapicClient->getManagedFolder($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storage.control.v2.StorageControl/GetManagedFolder', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getManagedFolderExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->managedFolderName('[PROJECT]', '[BUCKET]', '[MANAGED_FOLDER]'); - $request = (new GetManagedFolderRequest()) - ->setName($formattedName); - try { - $gapicClient->getManagedFolder($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getOrganizationIntelligenceConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new IntelligenceConfig(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->intelligenceConfigName('[FOLDER]', '[LOCATION]'); - $request = (new GetOrganizationIntelligenceConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->getOrganizationIntelligenceConfig($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storage.control.v2.StorageControl/GetOrganizationIntelligenceConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getOrganizationIntelligenceConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->intelligenceConfigName('[FOLDER]', '[LOCATION]'); - $request = (new GetOrganizationIntelligenceConfigRequest()) - ->setName($formattedName); - try { - $gapicClient->getOrganizationIntelligenceConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getProjectIntelligenceConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new IntelligenceConfig(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->intelligenceConfigName('[FOLDER]', '[LOCATION]'); - $request = (new GetProjectIntelligenceConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->getProjectIntelligenceConfig($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storage.control.v2.StorageControl/GetProjectIntelligenceConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getProjectIntelligenceConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->intelligenceConfigName('[FOLDER]', '[LOCATION]'); - $request = (new GetProjectIntelligenceConfigRequest()) - ->setName($formattedName); - try { - $gapicClient->getProjectIntelligenceConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getStorageLayoutTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $location = 'location1901043637'; - $locationType = 'locationType-1796591228'; - $expectedResponse = new StorageLayout(); - $expectedResponse->setName($name2); - $expectedResponse->setLocation($location); - $expectedResponse->setLocationType($locationType); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->storageLayoutName('[PROJECT]', '[BUCKET]'); - $request = (new GetStorageLayoutRequest()) - ->setName($formattedName); - $response = $gapicClient->getStorageLayout($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storage.control.v2.StorageControl/GetStorageLayout', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getStorageLayoutExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->storageLayoutName('[PROJECT]', '[BUCKET]'); - $request = (new GetStorageLayoutRequest()) - ->setName($formattedName); - try { - $gapicClient->getStorageLayout($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAnywhereCachesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $anywhereCachesElement = new AnywhereCache(); - $anywhereCaches = [ - $anywhereCachesElement, - ]; - $expectedResponse = new ListAnywhereCachesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAnywhereCaches($anywhereCaches); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); - $request = (new ListAnywhereCachesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAnywhereCaches($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAnywhereCaches()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storage.control.v2.StorageControl/ListAnywhereCaches', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAnywhereCachesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); - $request = (new ListAnywhereCachesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAnywhereCaches($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listFoldersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $foldersElement = new Folder(); - $folders = [ - $foldersElement, - ]; - $expectedResponse = new ListFoldersResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setFolders($folders); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); - $request = (new ListFoldersRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listFolders($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getFolders()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storage.control.v2.StorageControl/ListFolders', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listFoldersExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); - $request = (new ListFoldersRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listFolders($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listManagedFoldersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $managedFoldersElement = new ManagedFolder(); - $managedFolders = [ - $managedFoldersElement, - ]; - $expectedResponse = new ListManagedFoldersResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setManagedFolders($managedFolders); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); - $request = (new ListManagedFoldersRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listManagedFolders($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getManagedFolders()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storage.control.v2.StorageControl/ListManagedFolders', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listManagedFoldersExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); - $request = (new ListManagedFoldersRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listManagedFolders($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function pauseAnywhereCacheTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $zone = 'zone3744684'; - $admissionPolicy = 'admissionPolicy1847270952'; - $state = 'state109757585'; - $pendingUpdate = false; - $expectedResponse = new AnywhereCache(); - $expectedResponse->setName($name2); - $expectedResponse->setZone($zone); - $expectedResponse->setAdmissionPolicy($admissionPolicy); - $expectedResponse->setState($state); - $expectedResponse->setPendingUpdate($pendingUpdate); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->anywhereCacheName('[PROJECT]', '[BUCKET]', '[ANYWHERE_CACHE]'); - $request = (new PauseAnywhereCacheRequest()) - ->setName($formattedName); - $response = $gapicClient->pauseAnywhereCache($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storage.control.v2.StorageControl/PauseAnywhereCache', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function pauseAnywhereCacheExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->anywhereCacheName('[PROJECT]', '[BUCKET]', '[ANYWHERE_CACHE]'); - $request = (new PauseAnywhereCacheRequest()) - ->setName($formattedName); - try { - $gapicClient->pauseAnywhereCache($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function renameFolderTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/renameFolderTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $metageneration = 1048558813; - $expectedResponse = new Folder(); - $expectedResponse->setName($name2); - $expectedResponse->setMetageneration($metageneration); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/renameFolderTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); - $destinationFolderId = 'destinationFolderId368368539'; - $request = (new RenameFolderRequest()) - ->setName($formattedName) - ->setDestinationFolderId($destinationFolderId); - $response = $gapicClient->renameFolder($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.storage.control.v2.StorageControl/RenameFolder', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getDestinationFolderId(); - $this->assertProtobufEquals($destinationFolderId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/renameFolderTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function renameFolderExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/renameFolderTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->folderName('[PROJECT]', '[BUCKET]', '[FOLDER]'); - $destinationFolderId = 'destinationFolderId368368539'; - $request = (new RenameFolderRequest()) - ->setName($formattedName) - ->setDestinationFolderId($destinationFolderId); - $response = $gapicClient->renameFolder($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/renameFolderTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function resumeAnywhereCacheTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $zone = 'zone3744684'; - $admissionPolicy = 'admissionPolicy1847270952'; - $state = 'state109757585'; - $pendingUpdate = false; - $expectedResponse = new AnywhereCache(); - $expectedResponse->setName($name2); - $expectedResponse->setZone($zone); - $expectedResponse->setAdmissionPolicy($admissionPolicy); - $expectedResponse->setState($state); - $expectedResponse->setPendingUpdate($pendingUpdate); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->anywhereCacheName('[PROJECT]', '[BUCKET]', '[ANYWHERE_CACHE]'); - $request = (new ResumeAnywhereCacheRequest()) - ->setName($formattedName); - $response = $gapicClient->resumeAnywhereCache($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storage.control.v2.StorageControl/ResumeAnywhereCache', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function resumeAnywhereCacheExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->anywhereCacheName('[PROJECT]', '[BUCKET]', '[ANYWHERE_CACHE]'); - $request = (new ResumeAnywhereCacheRequest()) - ->setName($formattedName); - try { - $gapicClient->resumeAnywhereCache($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storage.control.v2.StorageControl/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storage.control.v2.StorageControl/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAnywhereCacheTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAnywhereCacheTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $zone = 'zone3744684'; - $admissionPolicy = 'admissionPolicy1847270952'; - $state = 'state109757585'; - $pendingUpdate = false; - $expectedResponse = new AnywhereCache(); - $expectedResponse->setName($name); - $expectedResponse->setZone($zone); - $expectedResponse->setAdmissionPolicy($admissionPolicy); - $expectedResponse->setState($state); - $expectedResponse->setPendingUpdate($pendingUpdate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateAnywhereCacheTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $anywhereCache = new AnywhereCache(); - $updateMask = new FieldMask(); - $request = (new UpdateAnywhereCacheRequest()) - ->setAnywhereCache($anywhereCache) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateAnywhereCache($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.storage.control.v2.StorageControl/UpdateAnywhereCache', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getAnywhereCache(); - $this->assertProtobufEquals($anywhereCache, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAnywhereCacheTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateAnywhereCacheExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAnywhereCacheTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $anywhereCache = new AnywhereCache(); - $updateMask = new FieldMask(); - $request = (new UpdateAnywhereCacheRequest()) - ->setAnywhereCache($anywhereCache) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateAnywhereCache($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAnywhereCacheTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateFolderIntelligenceConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new IntelligenceConfig(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $intelligenceConfig = new IntelligenceConfig(); - $updateMask = new FieldMask(); - $request = (new UpdateFolderIntelligenceConfigRequest()) - ->setIntelligenceConfig($intelligenceConfig) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateFolderIntelligenceConfig($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storage.control.v2.StorageControl/UpdateFolderIntelligenceConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getIntelligenceConfig(); - $this->assertProtobufEquals($intelligenceConfig, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateFolderIntelligenceConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $intelligenceConfig = new IntelligenceConfig(); - $updateMask = new FieldMask(); - $request = (new UpdateFolderIntelligenceConfigRequest()) - ->setIntelligenceConfig($intelligenceConfig) - ->setUpdateMask($updateMask); - try { - $gapicClient->updateFolderIntelligenceConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateOrganizationIntelligenceConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new IntelligenceConfig(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $intelligenceConfig = new IntelligenceConfig(); - $updateMask = new FieldMask(); - $request = (new UpdateOrganizationIntelligenceConfigRequest()) - ->setIntelligenceConfig($intelligenceConfig) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateOrganizationIntelligenceConfig($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storage.control.v2.StorageControl/UpdateOrganizationIntelligenceConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getIntelligenceConfig(); - $this->assertProtobufEquals($intelligenceConfig, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateOrganizationIntelligenceConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $intelligenceConfig = new IntelligenceConfig(); - $updateMask = new FieldMask(); - $request = (new UpdateOrganizationIntelligenceConfigRequest()) - ->setIntelligenceConfig($intelligenceConfig) - ->setUpdateMask($updateMask); - try { - $gapicClient->updateOrganizationIntelligenceConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateProjectIntelligenceConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new IntelligenceConfig(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $intelligenceConfig = new IntelligenceConfig(); - $updateMask = new FieldMask(); - $request = (new UpdateProjectIntelligenceConfigRequest()) - ->setIntelligenceConfig($intelligenceConfig) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateProjectIntelligenceConfig($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.storage.control.v2.StorageControl/UpdateProjectIntelligenceConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getIntelligenceConfig(); - $this->assertProtobufEquals($intelligenceConfig, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateProjectIntelligenceConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $intelligenceConfig = new IntelligenceConfig(); - $updateMask = new FieldMask(); - $request = (new UpdateProjectIntelligenceConfigRequest()) - ->setIntelligenceConfig($intelligenceConfig) - ->setUpdateMask($updateMask); - try { - $gapicClient->updateProjectIntelligenceConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createAnywhereCacheAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAnywhereCacheTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $zone = 'zone3744684'; - $admissionPolicy = 'admissionPolicy1847270952'; - $state = 'state109757585'; - $pendingUpdate = false; - $expectedResponse = new AnywhereCache(); - $expectedResponse->setName($name); - $expectedResponse->setZone($zone); - $expectedResponse->setAdmissionPolicy($admissionPolicy); - $expectedResponse->setState($state); - $expectedResponse->setPendingUpdate($pendingUpdate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAnywhereCacheTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->bucketName('[PROJECT]', '[BUCKET]'); - $anywhereCache = new AnywhereCache(); - $request = (new CreateAnywhereCacheRequest()) - ->setParent($formattedParent) - ->setAnywhereCache($anywhereCache); - $response = $gapicClient->createAnywhereCacheAsync($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.storage.control.v2.StorageControl/CreateAnywhereCache', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAnywhereCache(); - $this->assertProtobufEquals($anywhereCache, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAnywhereCacheTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -}